Actions
Feature #14055
closedString#casecmp should use Unicode folding
Status:
Rejected
Assignee:
-
Target version:
-
Description
The following string and symbol methods are currently only ASCII aware:
- String#casecmp
- String#casecmp!
- Symbol#casecmp
- Symbol#casecmp!
For example:
"a".casecmp("A") #=> 0
"ä".casecmp("Ä") #=> 1
Now that Ruby has implemented case-folding (which is meant for comparing strings, see http://unicode.org/faq/casemap_charprop.html#2), it should be used when doing a casecmp on Unicode strings:
"Ä".downcase(:fold) == "ä" #=> true
Actions
Like0
Like0Like0Like0