Split the String in android programming

If you are splitting the string value, you just use the method,
public String splitString(String s) {
         return new LinkedHashSet<String>(Arrays.asList(s.split(", "))).toString().replaceAll("(^\\[|\\]$)", "").replace(",", ", ");

Reference: LinkedHashSet


Popular posts from this blog

Clear the app data programmatically in android

convert an integer to a string in java

Print the large string values in android log cat.