commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Scholte (JIRA)" <j...@apache.org>
Subject [jira] Commented: (LANG-447) String case-insensitive comparisons, equals, and hashing
Date Tue, 01 Jul 2008 15:14:46 GMT

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

Robert Scholte commented on LANG-447:
-------------------------------------

Sounds like [LANG-316]

> String case-insensitive comparisons, equals, and hashing
> --------------------------------------------------------
>
>                 Key: LANG-447
>                 URL: https://issues.apache.org/jira/browse/LANG-447
>             Project: Commons Lang
>          Issue Type: Improvement
>            Reporter: Paul Benedict
>             Fix For: 3.0
>
>
> A common pattern I have is comparing strings case-insensitive in equals(), but this also
means for hashCode() and compareTo() as well. I am looking for null-safe versions of the following:
> StringUtils.equalsIgnoreCase(s1, s2); // already present
> StringUtils.compareToIgnoreCase(s1, s2);
> CompareToBuilder.appendIgnoreCase(s1, s2);
> HashCodeBuilder.appendIgnoreCase(s1, s2);
> The last three methods must use the same insensitive algorithm as equalsIgnoreCase().
All four must compare as upper case or lower case, and documented as such.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message