home *** CD-ROM | disk | FTP | other *** search
/ PC Extra Super CD 1998 January / PCPLUS131.iso / DJGPP / V2 / DJLSR201.ZIP / src / libc / compat / string / stricmp.c < prev    next >
Encoding:
C/C++ Source or Header  |  1995-11-16  |  342 b   |  18 lines

  1. /* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
  2. #include <libc/stubs.h>
  3. #include <string.h>
  4. #include <ctype.h>
  5.  
  6. int
  7. stricmp(const char *s1, const char *s2)
  8. {
  9.   while (tolower(*s1) == tolower(*s2))
  10.   {
  11.     if (*s1 == 0)
  12.       return 0;
  13.     s1++;
  14.     s2++;
  15.   }
  16.   return (int)tolower(*s1) - (int)tolower(*s2);
  17. }
  18.