<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
<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