emacs-devel
[Top][All Lists]
Advanced

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

Re: case-insensitive string comparison


From: Roland Winkler
Subject: Re: case-insensitive string comparison
Date: Tue, 19 Jul 2022 21:21:13 -0500

On Tue, Jul 19 2022, Sam Steingold wrote:
> No, because I need to be able to pass `string-equal-ignore-case' to
> things like `cl-find' as `:test' &c.

That sounds like a rather particular use case that, I believe, should
not motivate the design of what goes into subr.el.

> Also, if you look at fns.c, `string-equal' is basically `memcmp', while
> `compare-strings' is way more complex.

I don't think that's an obstacle for anything.

- The string-delimiting args and underlying machinery of compare-strings
  are something that can be skipped with string-equal.

- On the other hand, string comparison with case-folding is more complex
  than string comparison without case-folding, by its very definition.

> PS. Actually, compare-strings/ignore_case is broken because it does,
> essentially, upcase both arguments, see
> https://stackoverflow.com/q/319426/850781

That's a very different issue.



reply via email to

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