home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 216.lha / EdLib_v1.0 / stricmp.c < prev    next >
C/C++ Source or Header  |  1996-02-15  |  378b  |  17 lines

  1. /* edlib  version 1.0 of 04/08/88 */
  2. #include <ctype.h>
  3.  
  4. int stricmp(str1,str2)
  5. char *str1,*str2;
  6. {
  7.     int index = 0;
  8.  
  9.     while ( str1[index] && str2[index] &&
  10.             tolower(str1[index]) == tolower(str2[index]) )
  11.         ++index;
  12.  
  13.     return( (tolower(str1[index]) < tolower(str2[index])) ? -1 :
  14.           ( (tolower(str1[index]) > tolower(str2[index])) ?  1 : 0) );
  15. }
  16.  
  17.