-
Notifications
You must be signed in to change notification settings - Fork 125
feat: add case insensitive comparison for strings (ASCII only) #1283
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
feat: add case insensitive comparison for strings (ASCII only) #1283
Conversation
dc60a14
to
620dff8
Compare
Mathlib CI status (docs):
|
I will review this in a couple of days. Regarding names, I think the core style would prefer PS: If you need Unicode locale-independent case folding then please add a feature request to UnicodeBasic. I'm planning to add a few more normalization features this summer and this is an easy addition to the pile. |
There's a lot here! A lot of which is great! Let's split it though. Can you make a separate PR for the Let me know if you need instructions or other assistance doing that. |
532ab26
to
848c993
Compare
I believe I was able to do this, let me know if I did something different.
I'll make the appropriate changes if the verdict is that ASCII is preferable. |
d864672
to
4aeac4e
Compare
I tried to match the Char setup in a way that made sense. |
I implemented the requested changes with one modification: |
Looks good! After much consideration, the quotient type
In fact, I would recommend using the subtype Please delete the |
@ammkrn Have you tried the subtype approach I suggested? I'm curious to hear whether that works for your project. |
Adds ASCII-case insensitive comparisons for `String` following the pattern established for `Char`.
27a7816
to
a982cf7
Compare
I have not, but I have removed the requested files and squashed the commits. |
I fixed a tiny thing: = is better than iff for Our Mathlib check is unreliable right now. I will have to do a manual check just to be sure. I'm juggling several pots, pans and plates right now, so please ping me again if that check takes more than a couple of weeks. Thanks for your patience! |
Local Mathlib tests have passed. Since it's unlikely that this PR would break Mathlib, this is strong enough evidence that the alleged failure is a malfunction of our CI. I am proceeding with the merge. |
Adds ASCII-only case insensitive comparison to
Char
andString
.