[jira] [Commented] (LANG-787) StringUtils.RemoveIgnoreCase desired
[ https://issues.apache.org/jira/browse/LANG-787?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15293724#comment-15293724 ] ASF GitHub Bot commented on LANG-787: - GitHub user PascalSchumacher opened a pull request: https://github.com/apache/commons-lang/pull/146 LANG-787: Add StringUtils#removeIgnoreCase Patch by Gokul Nanthakumar C You can merge this pull request into a Git repository by running: $ git pull https://github.com/PascalSchumacher/commons-lang StringUtils#removeIgnoreCase Alternatively you can review and apply these changes as the patch at: https://github.com/apache/commons-lang/pull/146.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #146 commit eccf213204b776e40efcc031f4c0df560b9421e9 Author: pascalschumacherDate: 2016-05-20T16:59:00Z LANG-787: Add StringUtils#removeIgnoreCase Patch by Gokul Nanthakumar C > StringUtils.RemoveIgnoreCase desired > > > Key: LANG-787 > URL: https://issues.apache.org/jira/browse/LANG-787 > Project: Commons Lang > Issue Type: New Feature > Components: lang.* >Affects Versions: 3.1 >Reporter: david cogen >Priority: Minor > Fix For: Review Patch > > Attachments: IgnoreCaseForRemoveAndReplace.patch > > > removeStartIgnoreCase() and removeEndIgnoreCase() exist, so why not > removeIgnoreCase() > Specifically: > String removeIgnoreCase(String str, String remove) -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (LANG-787) StringUtils.RemoveIgnoreCase desired
[ https://issues.apache.org/jira/browse/LANG-787?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13203323#comment-13203323 ] Henri Yandell commented on LANG-787: Matt: An enum-focused redo of the API for 4.0 to get rid of the 'use a different method name' approach would be an option. I'd point to the NumericEntityUnescaper class and its OPTION pattern as a way to have a nice API that allows future tweaks without screwing with backwards compatibility. Gary: The if/else problem you list is only valid in the use cases where you want to reflect the choice to a higher level of the system. I don't think there's a reason to think that is the majority use case, and even if it is it's easy to write your own simple function above ours to simplify your code. StringUtils.RemoveIgnoreCase desired Key: LANG-787 URL: https://issues.apache.org/jira/browse/LANG-787 Project: Commons Lang Issue Type: New Feature Components: lang.* Affects Versions: 3.1 Reporter: david cogen Priority: Minor removeStartIgnoreCase() and removeEndIgnoreCase() exist, so why not removeIgnoreCase() Specifically: String removeIgnoreCase(String str, String remove) -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (LANG-787) StringUtils.RemoveIgnoreCase desired
[ https://issues.apache.org/jira/browse/LANG-787?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13200755#comment-13200755 ] Gary D. Gregory commented on LANG-787: -- The issue with named Apis like this is that you end up with ugly code like If option then Call apiIgnoreCase Else Call apiDont ignoreCase So do we provide both flavors? -- Posted from Bugbox for iPhone StringUtils.RemoveIgnoreCase desired Key: LANG-787 URL: https://issues.apache.org/jira/browse/LANG-787 Project: Commons Lang Issue Type: New Feature Components: lang.* Affects Versions: 3.1 Reporter: david cogen Priority: Minor removeStartIgnoreCase() and removeEndIgnoreCase() exist, so why not removeIgnoreCase() Specifically: String removeIgnoreCase(String str, String remove) -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (LANG-787) StringUtils.RemoveIgnoreCase desired
[ https://issues.apache.org/jira/browse/LANG-787?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13200888#comment-13200888 ] Matt Benson commented on LANG-787: -- An enum. In particular the casing thing comes up so often that providing an enum specifically for this purpose doesn't seem unreasonable. StringUtils.RemoveIgnoreCase desired Key: LANG-787 URL: https://issues.apache.org/jira/browse/LANG-787 Project: Commons Lang Issue Type: New Feature Components: lang.* Affects Versions: 3.1 Reporter: david cogen Priority: Minor removeStartIgnoreCase() and removeEndIgnoreCase() exist, so why not removeIgnoreCase() Specifically: String removeIgnoreCase(String str, String remove) -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (LANG-787) StringUtils.RemoveIgnoreCase desired
[ https://issues.apache.org/jira/browse/LANG-787?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13200676#comment-13200676 ] Henri Yandell commented on LANG-787: boolean APIs are unreadable :) remove(str, foo, true). Could mean anything. removeIgnoreCase seems a fair API add - patches very much welcome :) StringUtils.RemoveIgnoreCase desired Key: LANG-787 URL: https://issues.apache.org/jira/browse/LANG-787 Project: Commons Lang Issue Type: New Feature Components: lang.* Affects Versions: 3.1 Reporter: david cogen Priority: Minor removeStartIgnoreCase() and removeEndIgnoreCase() exist, so why not removeIgnoreCase() Specifically: String removeIgnoreCase(String str, String remove) -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (LANG-787) StringUtils.RemoveIgnoreCase desired
[ https://issues.apache.org/jira/browse/LANG-787?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13197768#comment-13197768 ] Gary D. Gregory commented on LANG-787: -- Maybe we should add APIs with a 'boolean ignoreCsse' to all methods that match strings. StringUtils.RemoveIgnoreCase desired Key: LANG-787 URL: https://issues.apache.org/jira/browse/LANG-787 Project: Commons Lang Issue Type: New Feature Components: lang.* Affects Versions: 3.1 Reporter: david cogen Priority: Minor removeStartIgnoreCase() and removeEndIgnoreCase() exist, so why not removeIgnoreCase() Specifically: String removeIgnoreCase(String str, String remove) -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (LANG-787) StringUtils.RemoveIgnoreCase desired
[ https://issues.apache.org/jira/browse/LANG-787?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13197772#comment-13197772 ] david cogen commented on LANG-787: -- That might have been preferable if starting over, but the *ignoreCase suffix was used in class String and it probably makes sense to continue this convention. StringUtils.RemoveIgnoreCase desired Key: LANG-787 URL: https://issues.apache.org/jira/browse/LANG-787 Project: Commons Lang Issue Type: New Feature Components: lang.* Affects Versions: 3.1 Reporter: david cogen Priority: Minor removeStartIgnoreCase() and removeEndIgnoreCase() exist, so why not removeIgnoreCase() Specifically: String removeIgnoreCase(String str, String remove) -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira