Because either string could be shorter than len.
strncasecmp() and strncasecmp_l() compare at most len characters.
^^^^^^^
"NUL-terminated string" is firmly explaining to people that in C,
a string is only a string if it ends in a NUL. There's a large
contingent of folk who don't get it.
Roderick <[email protected]> wrote:
>
>
> From the man page:
>
> """""
> These functions compare the NUL-terminated strings s1 and s2 and
> return an [...].
>
> strncasecmp() and strncasecmp_l() compare at most len characters.
> """""
>
> Why NULL-terminated when comparing at most len characters?!
>
> Rod.
>