[
https://issues.apache.org/jira/browse/LANG-1481?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Gary Gregory updated LANG-1481:
-------------------------------
Description:
We already have {{StringUtils.split(String,*)`}}, but I want to work with many
inputs, so add {{StringUtils.split()}} methods with {{String[]}} inputs:
{code:java}
/**
* <p>Splits the provided text array into an array, separator specified.
* This is an alternative to using StringTokenizer.</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>A {@code null} input String returns {@code null}.</p>
*
* <pre>
* StringUtils.split([null], *) = null
* StringUtils.split([""], *) = []
* 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"]
* StringUtils.split(["a:b:c"], '.') = ["a:b:c"]
* StringUtils.split(["a b c"], ' ') = ["a", "b", "c"]
* </pre>
*
* @param strArray the String[] to parse, may be null
* @param separatorChar the character used as the delimiter
* @return an array of parsed Strings, {@code null} if null String input
* @since 3.10
*/
{code}
was:
We already have {{StringUtils.split(String,*)`}}, but I want to work with many
inputs, so add {{StringUtils.split()}} methods with {{String[]}} inputs:
> Add StringUtils.split() methods with String[] input.
> ----------------------------------------------------
>
> Key: LANG-1481
> URL: https://issues.apache.org/jira/browse/LANG-1481
> Project: Commons Lang
> Issue Type: New Feature
> Reporter: Gary Gregory
> Assignee: Gary Gregory
> Priority: Major
>
> We already have {{StringUtils.split(String,*)`}}, but I want to work with
> many inputs, so add {{StringUtils.split()}} methods with {{String[]}} inputs:
> {code:java}
> /**
> * <p>Splits the provided text array into an array, separator specified.
> * This is an alternative to using StringTokenizer.</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>A {@code null} input String returns {@code null}.</p>
> *
> * <pre>
> * StringUtils.split([null], *) = null
> * StringUtils.split([""], *) = []
> * 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"]
> * StringUtils.split(["a:b:c"], '.') = ["a:b:c"]
> * StringUtils.split(["a b c"], ' ') = ["a", "b", "c"]
> * </pre>
> *
> * @param strArray the String[] to parse, may be null
> * @param separatorChar the character used as the delimiter
> * @return an array of parsed Strings, {@code null} if null String input
> * @since 3.10
> */
> {code}
--
This message was sent by Atlassian Jira
(v8.3.2#803003)