home *** CD-ROM | disk | FTP | other *** search
- /* C.Strnucmp: compare two strings for n bytes, treating all letters as
- * upper case
- */
-
- #include <ctype.h>
- #include "utils.h"
-
- int strnucmp (const char *s, const char *t, int n)
- {
- while ( --n >= 0 )
- {
- if ( *s == '\0' || *t == '\0' || toupper(*s) != toupper(*t) )
- return (toupper(*s) - toupper(*t));
- ++s;
- ++t;
- }
-
- return (0);
- }
-