commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joanne Polsky (JIRA)" <j...@apache.org>
Subject [jira] [Created] (LANG-875) StringUtils: Include methods for appending suffix or prepending a prefix if not already present
Date Thu, 28 Feb 2013 19:23:14 GMT
Joanne Polsky created LANG-875:
----------------------------------

             Summary: StringUtils: Include methods for appending suffix or prepending a prefix
if not already present
                 Key: LANG-875
                 URL: https://issues.apache.org/jira/browse/LANG-875
             Project: Commons Lang
          Issue Type: Improvement
          Components: lang.*
    Affects Versions: 3.1
            Reporter: Joanne Polsky
            Priority: Minor
             Fix For: 3.x


StringUtils has various methods to checking and removing a substring from the start/end of
a string.  I've attached a proposed patch for new methods that seems to fit well with these.
 These methods will append a suffix to the end or prepend a prefix to the start of the string
if not already present along with some variations on these (such as ignoring case and including
an additional list of suffixes/prefixes).

The methods include:
- appendIfMissing
- appendIfMissingAny
- appendIfMissingIgnoreCase
- appendIfMissingAnyIgnoreCase
- prependIfMissing
- prependIfMissingAny
- prependIfMissingIgnoreCase
- prependIfMissingAnyIgnoreCase

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message