Gives access to the default split strategy, which splits
the {@code input} String by using a comma (,).
<p>

@param input String to split.
@return List of substrings of the input string
@throws NullPointerException if {@code input} argument is null.
161578
public List<String> splitWithDefaultSplitStrategy(String input) {
        if (input == null) {
            throw new NullPointerException(makeNullArgumentErrorMsg("input"));
        }
        return defaultSplitStrategy().split(input, IGNORED);
    }
544186
public List<String> split(String s) {

        List<String> result = new ArrayList<String>();

        if (s == null) {
            return result;
        }

        boolean seenEscape = false;

        // Used to detect if the last char was a separator,
        // in which case we append an empty string
        boolean seenSeparator = false;

        StringBuilder sb = new StringBuilder();
        for (int i = 0; i < s.length(); i++) {
            seenSeparator = false;
            char c = s.charAt(i);
            if (seenEscape) {
                if (c == escapeChar || c == separator) {
                    sb.append(c);
                } else {
                    sb.append(escapeChar).append(c);
                }
                seenEscape = false;
            } else {
                if (c == escapeChar) {
                    seenEscape = true;
                } else if (c == separator) {
                    if (sb.length() == 0 && convertEmptyToNull) {
                        result.add(null);
                    } else {
                        result.add(sb.toString());
                    }
                    sb.setLength(0);
                    seenSeparator = true;
                } else {
                    sb.append(c);
                }
            }
        }

        // Clean up
        if (seenEscape) {
            sb.append(escapeChar);
        }

        if (sb.length() > 0 || seenSeparator) {

            if (sb.length() == 0 && convertEmptyToNull) {
                result.add(null);
            } else {
                result.add(sb.toString());
            }

        }

        return result;
    }
165685
public static Map<String, String> toStringStringMap(Map input) {
        Map<String, String> map = new HashMap<>();
        for (Object o : input.keySet()) {
            map.put(o.toString(), input.get(o) != null ? input.get(o).toString() : "");
        }
        return map;
    }
1334540
public static String[] split(String value) {
        if (value == null || "".equals(value)) {
            return EMPTY_STRING_ARRAY;
        }
        int len = value.length();
        List<String> list = new LinkedList<>();
        boolean collectingSpace = true;
        int start = 0;
        for (int i = 0; i < len; i++) {
            char c = value.charAt(i);
            if (c == ' ' || c == '\t' || c == '\n' || c == '\r') {
                if (!collectingSpace) {
                    list.add(value.substring(start, i));
                    collectingSpace = true;
                }
            } else {
                if (collectingSpace) {
                    start = i;
                    collectingSpace = false;
                }
            }
        }
        if (start < len) {
            int end = len;
            for (int i = 1; len > i; i++) {
                char c = value.charAt(len - i);
                if (c == ' ' || c == '\t' || c == '\n' || c == '\r') {
                    end--;
                    continue;
                }
                break;
            }
            list.add(value.substring(start, end));
        }
        return list.toArray(EMPTY_STRING_ARRAY);
    }
955236
public static List<String> splitAsList(String text, String delimiter) {
        List<String> answer = new ArrayList<String>();
        if (text != null && text.length() > 0) {
            answer.addAll(Arrays.asList(text.split(delimiter)));
        }
        return answer;
    }
686544
public static List<String> split(@Nullable final String str, final char separatorChar) {
		return split(str, separatorChar, 10);
	}
1322660
static String[] split( String selectors ) {
        ArrayList<String> result = null;
        int length = selectors.length();
        char quote = 0;
        int off = 0;
        for( int i = 0; i < length; i++ ) {
            char ch = selectors.charAt( i );
            switch( ch ) {
                case ',':
                    if( result == null ) {
                        result = new ArrayList<>();
                    }
                    result.add( selectors.substring( off, i ).trim() );
                    off = i + 1;
                    break;
                case '\'':
                case '\"':
                    do {
                        i++;
                    } while( i < length && selectors.charAt( i ) != ch );
            }
        }
        if( result == null ) {
            return new String[] { selectors.trim() };
        }
        result.add( selectors.substring( off, length ).trim() );
        return result.toArray( new String[result.size()] );
    }
543210
private static String[] split(String input) {
        char macroStart = MACRO_START.charAt(0);
        char macroEnd = MACRO_END.charAt(0);

        int startIndex = 0;
        boolean inMacro = false;

        List<String> list = new ArrayList<String>();

        for (int endIndex = 0; endIndex < input.length(); endIndex++) {
            char chr = input.charAt(endIndex);

            if (!inMacro) {
                if (chr == macroStart) {
                    String result = input.substring(startIndex, endIndex);
                    if (result.length() > 0) {
                        list.add(result);
                    }
                    inMacro = true;
                    startIndex = endIndex;
                }
            } else {
                if (chr == macroEnd) {
                    String result = input.substring(startIndex, endIndex + 1);
                    if (result.length() > 0) {
                        list.add(result);
                    }
                    inMacro = false;
                    startIndex = endIndex + 1;
                }
            }
        }

        String result = input.substring(startIndex);
        if (result.length() > 0) {
            list.add(result);
        }

        return list.toArray(new String[list.size()]);
    }
334656
public static List<Token> tokenize(CharSequence input, boolean textTrim) {
        if (input == null) {
            throw new IllegalArgumentException("input must not be null");
        }

        int inputLen = input.length();
        if (inputLen == 0) {
            List<Token> tokens = new ArrayList<>(1);
            tokens.add(new Token(""));
            return tokens;
        }

        int status = AT_TEXT;
        int tokenStartOffset = 0; // start position of token in the stringBuffer
        char symbol = Token.PARAMETER_SYMBOL; // PARAMETER_SYMBOL or ATTRIBUTE_SYMBOL
        char c;

        StringBuilder nameBuf = new StringBuilder();
        StringBuilder valueBuf = new StringBuilder();
        StringBuilder textBuf = new StringBuilder();

        List<Token> tokens = new ArrayList<>();

        for (int i = 0; i < inputLen; i++) {
            c = input.charAt(i);

            switch (status) {
            case AT_TEXT:
                textBuf.append(c);
                if (Token.isTokenSymbol(c)) {
                    symbol = c;
                    status = AT_TOKEN_SYMBOL;
                    // abc$ --> tokenStartOffset: 3
                    tokenStartOffset = textBuf.length() - 1;
                }
                break;
            case AT_TOKEN_SYMBOL:
                textBuf.append(c);
                if (c == Token.START_BRACKET) {
                    status = AT_TOKEN_NAME;
                } else {
                    if (Token.isTokenSymbol(c)) {
                        symbol = c;
                        status = AT_TOKEN_SYMBOL;
                        // abc$ --> tokenStartOffset: 3
                        tokenStartOffset = textBuf.length() - 1;
                    } else {
                        status = AT_TEXT;
                    }
                }
                break;
            case AT_TOKEN_NAME:
            case AT_TOKEN_VALUE:
                textBuf.append(c);
                if (status == AT_TOKEN_NAME) {
                    if (c == Token.VALUE_SEPARATOR) {
                        status = AT_TOKEN_VALUE;
                        break;
                    }
                }
                if (c == Token.END_BRACKET) {
                    if (nameBuf.length() > 0 || valueBuf.length() > 0) {
                        // save previous non-token string
                        if (tokenStartOffset > 0) {
                            String text = trimBuffer(textBuf, tokenStartOffset, textTrim);
                            Token token = new Token(text);
                            tokens.add(token);
                        }

                        // save token name and default value
                        Token token = createToken(symbol, nameBuf, valueBuf);
                        tokens.add(token);

                        status = AT_TEXT;
                        textBuf.setLength(0);
                        break;
                    }

                    status = AT_TEXT;
                    break;
                }
                if (status == AT_TOKEN_NAME) {
                    if (nameBuf.length() > MAX_TOKEN_NAME_LENGTH) {
                        status = AT_TEXT;
                        nameBuf.setLength(0);
                    }
                    nameBuf.append(c);
                } else {
                    valueBuf.append(c);
                }
                break;
            }
        }

        if (textBuf.length() > 0) {
            String text = trimBuffer(textBuf, textBuf.length(), textTrim);
            Token token = new Token(text);
            tokens.add(token);
        }

        return tokens;
    }
847909
public static String[] split(final String input, final char split) {
        int index = indexOf(input, split);
        int prevIndex = 0;
        final ArrayList<String> output = new ArrayList<String>();
        if (index == -1) {
            output.add(input);
            return output.toArray(new String[1]);
        }
        while (index != -1) {
            output.add(input.substring(prevIndex, index));
            prevIndex = index + 1;
            index = indexOf(input, split, index + 1);
        }
        output.add(input.substring(prevIndex, input.length()));
        return output.toArray(new String[output.size()]);
    }
69758
public static void split(String input, char delimiter, Consumer<String> callbackPerSubstring) {
        if(input == null) throw new NullPointerException("input cannot be null");
        
        final int len = input.length();
        
        int lastMark = 0;
        for (int i = 0; i < len; i++) {
            if (input.charAt(i) == delimiter) {
                callbackPerSubstring.accept(input.substring(lastMark, i));
                lastMark = i + 1;// 1 == delimiter length
            }
        }
        callbackPerSubstring.accept(input.substring(lastMark, len));
    }
865644
public static String[] split(String str, String separator){
    
    	return Pattern.compile(separator).split(str, -1);
    }
82350
public static String[] split(String str, String delim, int size) {
        String[] arr1 = new String[size];
        String[] arr2 = split(str, delim);
        for (int i = 0; i < arr1.length; i++) {
            if (i < arr2.length) {
                arr1[i] = arr2[i];
            } else {
                arr1[i] = EMPTY;
            }
        }
        return arr1;
    }
10705
public static List<String> splitAsList(String source, char delimiter) {

        return splitAsList(source, delimiter, false);
    }
1082459
public static List<String> split(String string, String delimiter) {
        return split(string, delimiter, true);
    }
350223
public static List<String> splitCommaSeparatedList(String text) {
    if (text == null || text.isEmpty()) {
      return Collections.emptyList();
    }
    Matcher matcher = pattern.matcher(text);
    List<String> parts = new ArrayList<String>();
    while(matcher.find()) {
      parts.add(matcher.group().trim());
    }
    return parts;
  }
1110641
public static List<String> split(String input, String punctuationChars, String quoteChars) {
		return split(input, punctuationChars, quoteChars, false, false, false);
	}