Skip to content
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

Open
steveklabnik opened this issue Feb 2, 2015 · 6 comments
Open

add unicode case folding for char/str #791

steveklabnik opened this issue Feb 2, 2015 · 6 comments
Labels
T-libs-api Relevant to the library API team, which will review and decide on the RFC.

Comments

@steveklabnik
Copy link
Member

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


@Centril
Copy link
Contributor

Centril commented Oct 7, 2018

triage: @clarcharr whatever happened to your PR and is this issue still relevant?

@clarfonthey
Copy link
Contributor

@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.

@crlf0710
Copy link
Member

There is https://github.com/unicode-rs/rust-caseless/ now. Maybe this can just be closed @Centril

@clarfonthey
Copy link
Contributor

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.

@Ralith
Copy link

Ralith commented Oct 29, 2019 via email

@clarfonthey
Copy link
Contributor

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, str supports code-point-based comparisons even though technically you should be comparing based upon locales. I feel that case folding is a welcome addition.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-libs-api Relevant to the library API team, which will review and decide on the RFC.
Projects
None yet
Development

No branches or pull requests

6 participants