Android String Split stringToListStr(String input)

Here you can find the source of stringToListStr(String input)

Description

string To List Str

Declaration

public static List<String> stringToListStr(String input) 

Method Source Code

//package com.java2s;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

public class Main {
    private static final String COMMA = ",";

    public static List<String> stringToListStr(String input) {

        List<String> outList = new ArrayList<String>();
        if (null == input || input.trim().isEmpty()) {
            return outList;
        }/*from w w w .  j  a  v  a2  s .  co m*/
        String[] out = input.split(COMMA);

        return Arrays.asList(out);
    }
}

Related

  1. strToArray(String string)
  2. strToArray(String string, String delim)
  3. getStringArray(String str)
  4. split(String source, String separator, int arraylength)
  5. split(String str, String delims, boolean trimTokens)
  6. splitStringOnWhitespace(String stringToSplit)
  7. stringToListByLine(final String fileContent)
  8. split(String str, String separatorChars)
  9. split(String str, char delimiter)