home *** CD-ROM | disk | FTP | other *** search
/ ARM Club 1 / ARM_CLUB_CD.iso / contents / apps / clib / progs / utilslib / c / Strlcmp < prev    next >
Encoding:
Text File  |  1991-04-20  |  330 b   |  15 lines

  1. /* C.Strlcmp: compare two strings, treating all letters as lower 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.