3 <<strcasecmp>>---case-insensitive character string compare
10 int strcasecmp(const char *<[a]>, const char *<[b]>);
14 int strcasecmp(<[a]>, <[b]>)
19 <<strcasecmp>> compares the string at <[a]> to
20 the string at <[b]> in a case-insensitive manner.
24 If <<*<[a]>>> sorts lexicographically after <<*<[b]>>> (after
25 both are converted to uppercase), <<strcasecmp>> returns a
26 number greater than zero. If the two strings match,
27 <<strcasecmp>> returns zero. If <<*<[a]>>> sorts
28 lexicographically before <<*<[b]>>>, <<strcasecmp>> returns a
29 number less than zero.
32 <<strcasecmp>> is in the Berkeley Software Distribution.
34 <<strcasecmp>> requires no supporting OS subroutines. It uses
35 tolower() from elsewhere in this library.
45 _DEFUN (strcasecmp, (s1, s2),
49 while (*s1 != '\0' && tolower(*s1) == tolower(*s2))
55 return tolower(*(unsigned char *) s1) - tolower(*(unsigned char *) s2);