You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2020/04/15 17:59:00 UTC

[jira] [Work logged] (LANG-1481) Add StringUtils.split() methods with String[] input.

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

ASF GitHub Bot logged work on LANG-1481:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 15/Apr/20 17:58
            Start Date: 15/Apr/20 17:58
    Worklog Time Spent: 10m 
      Work Description: RatishBansal commented on pull request #508: LANG-1481 Add StringUtils.split() methods with String[] input.
URL: https://github.com/apache/commons-lang/pull/508
 
 
   Leveraging the existing split(string,separator) method, to split each element of input array
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Issue Time Tracking
-------------------

            Worklog Id:     (was: 422925)
    Remaining Estimate: 0h
            Time Spent: 10m

> 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
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> 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)