[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: case-insensitive string comparison
From: |
Eli Zaretskii |
Subject: |
Re: case-insensitive string comparison |
Date: |
Tue, 26 Jul 2022 18:53:12 +0300 |
> From: Sam Steingold <sds@gnu.org>
> Date: Tue, 26 Jul 2022 10:16:08 -0400
>
> > Could be something macOS-specific. Maybe your system doesn't define
> > the __STDC_ISO_10646__ feature? In that case, string-collate-equalp
> > (see the doc string) behaves like string-equal, and that one doesn't
> > have a case-insensitive variant.
>
> How do I find out?
> --8<---------------cut here---------------start------------->8---
> echo > .zzz.c;
> gcc -E -dM .zzz.c | grep __STDC_ISO_10646__
> --8<---------------cut here---------------end--------------->8---
> does not print anything, but maybe I need to `#include' something?
No, that exactly means you are getting the string-equal fallback
instead. Here on GNU/Linux I get
$ gcc -E -dM foo.c | fgrep 10646
#define __STDC_ISO_10646__ 201706L
> >> I want to be able to use `string-equal-ignore-case' as a :test argument
> >> to things like `cl-find'.
> >
> > Then write a thin wrapper around compare-strings, and be done.
>
> I think the need is sufficiently generic, e.g., BBDB provides such a
> wrapper, as, I am sure, do many other packages.
> Many core files can be simplified by using `string-equal-ignore-case'
> (just like with the `string-prefix-p').
I'm not convinced, but I won't mount the barricades if Lars and/or
others think we need this.
- Re: case-insensitive string comparison, (continued)
- Re: case-insensitive string comparison, Roland Winkler, 2022/07/19
- Re: case-insensitive string comparison, Sam Steingold, 2022/07/19
- Re: case-insensitive string comparison, Roland Winkler, 2022/07/19
- Re: case-insensitive string comparison, Stefan Monnier, 2022/07/19
- Re: case-insensitive string comparison, Sam Steingold, 2022/07/20
- Re: case-insensitive string comparison, Sam Steingold, 2022/07/25
- Re: case-insensitive string comparison, Eli Zaretskii, 2022/07/25
- Re: case-insensitive string comparison, Sam Steingold, 2022/07/25
- Re: case-insensitive string comparison, Eli Zaretskii, 2022/07/26
- Re: case-insensitive string comparison, Sam Steingold, 2022/07/26
- Re: case-insensitive string comparison,
Eli Zaretskii <=
- Re: case-insensitive string comparison, Sam Steingold, 2022/07/26
- Re: case-insensitive string comparison, Lars Ingebrigtsen, 2022/07/26
- Re: case-insensitive string comparison, Robert Pluim, 2022/07/26
- Re: case-insensitive string comparison, Bruno Haible, 2022/07/25
- Re: case-insensitive string comparison, Richard Stallman, 2022/07/25
- Re: case-insensitive string comparison, Helmut Eller, 2022/07/26
- Re: case-insensitive string comparison, Eli Zaretskii, 2022/07/26
- Re: case-insensitive string comparison, Richard Stallman, 2022/07/26
- Re: case-insensitive string comparison, Eli Zaretskii, 2022/07/31
- Re: case-insensitive string comparison, Sam Steingold, 2022/07/26