You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We should switch from equality comparison on the first character returned by {upper,lower}case iterators to "does this character match any character in the {upper,lower}case iterator."
For what it’s worth, in ES6, a regex with both i (case-insensitive) and u (better Unicode support) flags uses common and simple mappings from Unicode’s CaseFolding.txt. These mapping preserve the number of code points. Using full mapping instead of simple gives “more correct” results, but it can grow the number of code points.
Either way, case folding (for caseless matching) is not the quite as either lower-case or upper-case.
I didn’t manage to find a spec for what Perl does exactly (though I didn’t search very hard). The Python documentation is equally unhelpful.
Activity
rustup.
SimonSapin commentedon Mar 15, 2015
For what it’s worth, in ES6, a regex with both
i(case-insensitive) andu(better Unicode support) flags uses common and simple mappings from Unicode’sCaseFolding.txt. These mapping preserve the number of code points. Using full mapping instead of simple gives “more correct” results, but it can grow the number of code points.Either way, case folding (for caseless matching) is not the quite as either lower-case or upper-case.
I didn’t manage to find a spec for what Perl does exactly (though I didn’t search very hard). The Python documentation is equally unhelpful.
Use Unicode simple case folding for case-insensitivity. Fix rust-lang#55
Use Unicode simple case folding for case-insensitivity. Fix rust-lang#55
Use Unicode simple case folding for case-insensitivity. Fix rust-lang#55