I have an EditText view which will allow the user to edit an address field. I want any text with a comma before it to be put on a new line so for example the following:
Some St., Some City, Some post code would be presented as:
Some St.,
Some City,
Some post code
Anyone know how I could do this?
Perhaps you could perform a
String.replace()to replace all commas with,\nso,
You then might have to do something to remove the whitespace
Alternatively, to remove all whitespace: