Add APIs for case folding to the standard library#154742
Add APIs for case folding to the standard library#154742Jules-Bertholet wants to merge 3 commits intorust-lang:mainfrom
Conversation
|
These commits modify the If this was unintentional then you should revert the changes before this PR is merged.
If you want to modify |
|
r? @scottmcm rustbot has assigned @scottmcm. Use Why was this reviewer chosen?The reviewer was selected based on:
|
This comment has been minimized.
This comment has been minimized.
5b5e617 to
bf4ee7c
Compare
|
@rustbot reroll |
This comment has been minimized.
This comment has been minimized.
With an unoptimized, non-`const` implementation for now.
bf4ee7c to
f504859
Compare
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
Libs-api requested these, so here they are.
New public API (gated behind
#[feature(casefold)]):Notes
core::unicode. To accomplish that, we compute the case-folding for most characters as the lowercase of their uppercase; this double mapping adds some complexity to the implementation.eq_ignore_case(); there may be a more performant implementation.char::eq_ignore_case()is left to future work—it's a potential footgun, so we may want to think more deeply about how to expose and document that API.@rustbot label T-libs-api A-unicode