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

  1. /* C.Strucmp: compare two strings, treating all letters as upper case */
  2.  
  3. #include <ctype.h>
  4. #include "utils.h"
  5.  
  6. int strucmp (const char *s, const char *t)
  7. {
  8.  
  9.         for ( ; toupper(*s) == toupper(*t); ++s, ++t )
  10.                 if ( *s == '\0' )
  11.                         return(0);
  12.  
  13.         return (toupper(*s) - toupper(*t));
  14. }
  15.  
  16.