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

Sebb commented on LANG-1351:
----------------------------

Sorry, but I think that is out of scope for the library.

There are lots of possible such 'convenience' methods.
If we are not careful, the library will become full of shortcuts which need 
documenting, testing, maintaining.

What about equalsIgnoreTrailingSpace, equalsIgnoreLeadingSpace, 
equalsIgnoreEmbeddedSpace and all their combinations?

If such sequences occur frequently in app code, that is the place to put the 
shortcuts.

> StringUtils.equalsIgnoreSurroundingSpace
> ----------------------------------------
>
>                 Key: LANG-1351
>                 URL: https://issues.apache.org/jira/browse/LANG-1351
>             Project: Commons Lang
>          Issue Type: New Feature
>          Components: lang.*
>            Reporter: akilan i
>            Priority: Minor
>
> Convenience method of StringUtils.equals("abc ".trim()," abc".trim()).  Often 
> we need to trim before we do equals.
>  StringUtils. equalsIgnoreSurroundingSpace(null, null)   = true
>  StringUtils. equalsIgnoreSurroundingSpace(null, "abc")  = false
>  StringUtils. equalsIgnoreSurroundingSpace("abc", null)  = false
>  StringUtils. equalsIgnoreSurroundingSpace("abc", "abc") = true
>  StringUtils. equalsIgnoreSurroundingSpace("abc", "ABC") = true
>  StringUtils.equalsIgnoreSurroundingSpace("abc    ","    abc") = true



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to