Liste des Groupes | Revenir à cl c |
On Tue, 4 Jun 2024 16:58:43 +0100It's a better match. But on gcc-O3, it still calls the library function up to version 12.x. After that, it's smart enough to generate similar code to my non-optimising compiler using the built-in feature.
bart <bc@freeuk.com> wrote:
On 04/06/2024 16:27, Scott Lurndal wrote:Will that be be better?David Brown <david.brown@hesbynett.no> writes:>On 04/06/2024 13:23, bart wrote:>It is incredibly useful:
>
if c in [' ', '\t', '\n'] then ... # whitespace
if (strpbrk(c, " \t\n") != NULL) it_is_whitespace.
That doesn't do the same thing. In my example, c is a character, not
a string.
>
if (memchr(" \t\n", c, 3) != NULL)
Les messages affichés proviennent d'usenet.