-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add unicode case folding for char/str #791
Comments
triage: @clarcharr whatever happened to your PR and is this issue still relevant? |
@Centril I never finished my PR and it's still relevant. Not sure if I'll be able to get to this any time soon. |
There is https://github.com/unicode-rs/rust-caseless/ now. Maybe this can just be closed @Centril |
Honestly? Not really. I feel that adding methods to obtain the case-folded forms of characters and strings to the standard library would be useful. The main justification is that uppercase/lowercase mappings are included, and not having a case-folding option means that many are likely to simply implement case-folding wrong because it would otherwise require adding an additional crate. These methods don't have to be particularly robust, just, I feel that having the tables available would be good. Crates like caseless still have a use case for providing things like case-insensitive matching, which this would not solve. |
If they're not robust, then the objective of preventing people from doing
it wrong would be actively undermined.
…On Tue, Oct 29, 2019, 16:37 Clar Fon ***@***.***> wrote:
Honestly? Not really.
I feel that adding methods to obtain the case-folded forms of characters
and strings to the standard library would be useful. The main justification
is that uppercase/lowercase mappings are included, and not having a
case-folding option means that many are likely to simply implement
case-folding wrong because it would otherwise require adding an additional
crate.
These methods don't have to be particularly robust, just, I feel that
having the tables available would be good. Crates like caseless still have
a use case for providing things like case-insensitive matching, which this
would not solve.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#791?email_source=notifications&email_token=AAAZQ3RQN2BO2Y2D2LG2NG3QRDCKRA5CNFSM4A3JGR6KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECSN47A#issuecomment-547675772>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAZQ3QFACNESSKWO7LMLNTQRDCKRANCNFSM4A3JGR6A>
.
|
Honestly, I disagree, but mostly because I didn't clarify what I meant by "not particularly robust." If you want 100% correctness you need to use locales, but Rust offers tools to do locale-agnostic operations. For example, |
Issue by thestinger
Monday Sep 09, 2013 at 19:10 GMT
For earlier discussion, see rust-lang/rust#9084
This issue was labelled with: A-libs, A-unicode, I-enhancement in the Rust repository
The text was updated successfully, but these errors were encountered: