[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: case-insensitive string comparison

From: Sam Steingold
Subject: Re: case-insensitive string comparison
Date: Mon, 25 Jul 2022 10:23:30 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (darwin)

> * Sam Steingold <fqf@tah.bet> [2022-07-20 12:22:33 -0400]:
>> * Stefan Monnier <zbaavre@veb.hzbagerny.pn> [2022-07-19 23:01:31 -0400]:
>>> PS. Actually, compare-strings/ignore_case is broken because it does,
>>> essentially, upcase both arguments, see 
>>> https://stackoverflow.com/q/319426/850781
>> Hmm... `string-collate-equalp`?
> (string-collate-equalp "a" "A" current-locale-environment t)
> ==> nil
> current-locale-environment
> ==> "en_US.UTF-8"

So, how do we do case-insensitive string comparison in Emacs?

It is okay to add a `string-equal-ignore-case' based on `compare-strings'?
(even though it does not recognize "SS" and "ß" as equal)

Or should we first implement something like casefold in Python?

Sam Steingold (http://sds.podval.org/) on darwin Ns 10.3.2113
http://childpsy.net http://calmchildstories.com http://steingoldpsychology.com
https://camera.org https://honestreporting.com https://www.memritv.org
Warning! Dates in calendar are closer than they appear!

reply via email to

[Prev in Thread] Current Thread [Next in Thread]