[RFC v3 2/4] string: Add streq,memeq,wcseq,wmemeq,strcaseeq[_l],wcscaseeq[_l] APIs

Florian Weimer fweimer@redhat.com
Wed Sep 3 10:18:25 GMT 2025


* Alejandro Colomar:

> These inline functions serve the most common use case of the comparison
> functions: test for equality.  They avoid the reversed return value that
> confuses programmers.  Using these APIs will result in more readable
> code, which in the end means safer code.
>
> Signed-off-by: Alejandro Colomar <alx@kernel.org>

These names are already widely used in applications, so this will cause
build failures.  I don't think we should add this before these
interfaces are standardized.  The standardization process could reverse
the meaning of the return value (0 meaning equal, as in the existing
comparison functions).  Or pick different names, so we'd have cause
trouble for developers for no reason.

Thanks,
Florian



More information about the Libc-alpha mailing list