[Solved] Splitting a string ignoring whitespace


We’ll need to see your code before we can begin troubleshooting. However, the following code should work just fine:

String address = "1,1,87 gandhi road,600005";

String[] stringArray = address.split(",");

for(String str : stringArray)
{
    // Do something with str.
}

5

solved Splitting a string ignoring whitespace