home *** CD-ROM | disk | FTP | other *** search
- /*
- * strcasecmp(s,t): Just like strcmp(3) but ignores case.
- *
- * Adapted from strcmp() in K&&R, page 102.
- *
- * George Ferguson, ferguson@cs.rochester.edu, 12 Feb 1991.
- */
-
- int
- strcasecmp(s,t)
- char *s,*t;
- {
- for ( ; *s == *t ||
- (*s >= 'A' && *s <= 'Z' && *s-'A'+'a' == *t) ||
- (*t >= 'A' && *t <= 'Z' && *t-'A'+'a' == *s) ; s++, t++)
- if (*s == '\0')
- return(0);
- return(*s - *t);
- }
-