5 int strcasecmp(const char *s1
, const char *s2
)
7 while (*s1
!= '\0' && tolower(*s1
) == tolower(*s2
)) {
12 return tolower(*(unsigned char *) s1
) - tolower(*(unsigned char *) s2
);
15 int strncasecmp(const char *s1
, const char *s2
, size_t n
)
20 while (n
-- != 0 && tolower(*s1
) == tolower(*s2
)) {
21 if(n
== 0 || *s1
== '\0')
27 return tolower(*(unsigned char *) s1
) - tolower(*(unsigned char *) s2
);