home *** CD-ROM | disk | FTP | other *** search
/ ARM Club 1 / ARM_CLUB_CD.iso / contents / apps / clib / progs / utilslib / utils_old / c / Strlcmp < prev    next >
Encoding:
Text File  |  1994-02-22  |  326 b   |  15 lines

  1. /*      > C.Strlcmp     - compare two strings, ignoring case      */
  2.  
  3. #include <ctype.h>
  4. #include "utils.h"
  5.  
  6. int strlcmp (const char *s, const char *t)
  7. {
  8.  
  9.         for ( ; tolower(*s) == tolower(*t); ++s, ++t )
  10.                 if ( *s == '\0' )
  11.                         return(0);
  12.  
  13.         return (tolower(*s) - tolower(*t));
  14. }
  15.