You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Gary Gregory (JIRA)" <ji...@apache.org> on 2016/08/16 15:24:20 UTC

[jira] [Resolved] (LANG-1257) Add APIs StringUtils.wrapIfMissing(String, char|String)

     [ https://issues.apache.org/jira/browse/LANG-1257?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gary Gregory resolved LANG-1257.
--------------------------------
    Resolution: Fixed

In Svn trunk. Reviews welcome.

> Add APIs StringUtils.wrapIfMissing(String, char|String)
> -------------------------------------------------------
>
>                 Key: LANG-1257
>                 URL: https://issues.apache.org/jira/browse/LANG-1257
>             Project: Commons Lang
>          Issue Type: New Feature
>          Components: lang.*
>            Reporter: Gary Gregory
>            Assignee: Gary Gregory
>             Fix For: 3.5
>
>
> Add APIs:
> - Add APIs StringUtils.wrapIfMissing(String, char)
> - Add APIs StringUtils.wrapIfMissing(String, String)
> Note: We already have:
> - StringUtils.wrap(String, char)
> - StringUtils.wrap(String, String)
> And we already use the "IfMissing" name segment in "appendIfMissing()" and "prependIfMissing()".
> Using "IfAbsent" would have been a better choice IMO since the JRE already uses "IfAbsent" in ConcurrentHashMap for example; but consistency is better here I think.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)