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:07:22 UTC

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

Gary Gregory created LANG-1257:
----------------------------------

             Summary: Add APIs StringUtils.wrapIfMissingt(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)