home *** CD-ROM | disk | FTP | other *** search
- #include <ctype.h>
- #include <string.h>
-
- /*
- ** stricmp() - Compare two strings in casesensitivly.
- **
- ** Made by Kasper B. Graversen (c) 1996
- **
- ** fixed by phx 01/98
- **
- ** This is freeware - use at own risc.
- */
-
- int stricmp(const char *str1, const char *str2)
- {
- while(tolower((unsigned char)*str1) == tolower((unsigned char)*str2)) {
- if(!*str1) return(0);
- str1++;str2++;
- }
- return(tolower(*(unsigned char *)str1)-tolower(*(unsigned char *)str2));
- }
-