commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matt Benson (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LANG-701) VarArgs Join
Date Sat, 21 May 2011 17:36:47 GMT

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

Matt Benson commented on LANG-701:
----------------------------------

I would support the addition of new methods to permit varargs usage with StringUtils operations
that were available in previous versions of [lang] but whose argument order didn't lend itself
to a smooth varargs transition; however IMO these should be _new_, not overloaded methods,
i.e. have new names.  I would recommend we use idiom patterns like {{joinDelimitedBy(delim,
args...)}}, for this example.

> VarArgs Join
> ------------
>
>                 Key: LANG-701
>                 URL: https://issues.apache.org/jira/browse/LANG-701
>             Project: Commons Lang
>          Issue Type: New Feature
>          Components: lang.text.*
>            Reporter: Gabriele Kahlout
>            Priority: Minor
>         Attachments: VarArgJoinTest.java
>
>
> <code>
> final String apple = "apple";
>         final String banana = "banana";
>         final String orange = "orange";
>         final String expected = apple +  SPACE + banana + SPACE + orange;
>         final String  actual = join(SPACE, apple, banana, orange);
>         final int expLength = expected.length();
>         final int actLength = actual.length();
>         assertEquals(expLength, actLength);
>         assertEquals(expected, actual);
> </code>
> I missed the functionality of joining strings with the space separator in one line. BTW,
why space ' ' not a constant field anywhere?

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message