StringUtils.split

<p> Splits the provided text into an array, separators specified. This is an alternative to using StringTokenizer. </p> <p> <p> The separator is not included in the returned string array. Adjacent separators are treated as one separator. For more control over the split use the StrTokenizer class. </p> <p> <p> A <code>null</code> input string returns <code>null</code>. A <code>null</code> separatorChars splits on whitespace. </p> <p> <pre> StringUtils.split(null, *) = null StringUtils.split("", *) = [] StringUtils.split("abc def", null) = ["abc", "def"] StringUtils.split("abc def", " ") = ["abc", "def"] StringUtils.split("abc def", " ") = ["abc", "def"] StringUtils.split("ab:cd:ef", ":") = ["ab", "cd", "ef"] </pre>

@param str the string to parse, may be null @param separatorChars the characters used as the delimiters, <code>null</code> splits on whitespace @return an array of parsed Strings, <code>null</code> if null string input

  1. string[] split(string str)
  2. string[] split(string str, string separatorChars)
    class StringUtils
    static
    string[]
    split
    (
    string str
    ,)
  3. string[] split(string str, char separatorChar)
  4. string[] split(string str, string separatorChars, int max)

Meta