<p>
Splits the provided text into an array, separator 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>.
</p>
<p>
<pre>
StringUtils.split(null, *) = null
StringUtils.split("", *) = []
StringUtils.split("a.b.c", '.') = ["a", "b", "c"]
StringUtils.split("a..b.c", '.') = ["a", "b", "c"]
StringUtils.split("a:b:c", '.') = ["a:b:c"]
StringUtils.split("a b c", ' ') = ["a", "b", "c"]
</pre>
@param str the string to parse, may be null
@param separatorChar the character used as the delimiter
@return an array of parsed Strings, <code>null</code> if null string
input
@since 2.0
<p> Splits the provided text into an array, separator 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>. </p> <p> <pre> StringUtils.split(null, *) = null StringUtils.split("", *) = [] StringUtils.split("a.b.c", '.') = ["a", "b", "c"] StringUtils.split("a..b.c", '.') = ["a", "b", "c"] StringUtils.split("a:b:c", '.') = ["a:b:c"] StringUtils.split("a b c", ' ') = ["a", "b", "c"] </pre>
@param str the string to parse, may be null @param separatorChar the character used as the delimiter @return an array of parsed Strings, <code>null</code> if null string input @since 2.0