[ 
https://issues.apache.org/jira/browse/LANG-1481?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17083529#comment-17083529
 ] 

Amar Prakash Pandey commented on LANG-1481:
-------------------------------------------

Hi [~ratish1992] in this case: 
{code:java}
StringUtils.split(["a.b",null], '.') = ["a", "b"]{code}

> 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 D. Gregory
>            Assignee: Gary D. 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}
> Looking for feedback...



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to