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

Mastering API Development: Why Postman Reigns Supreme Over Swagger

Email Address Validation

Flutter web view