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

Comments

Popular posts from this blog

Flutter Bloc - Clean Architecture

What's new in android 14?

Dependencies vs Dev Dependencies in Flutter