String s = "Some St., Some City, Some post code";
String strings[] = s.split(",");
for(int i = 0; i < strings.length; i++){
strings[i] = strings[i].trim();
strings[i] += ",
";
}
s = "";
for(int i = 0; i < strings.length; i++)
s += strings[i];