home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / alib / d1xx / d183 / mklib.lha / Mklib / Edlib / stricmp.c < prev    next >
C/C++ Source or Header  |  1989-02-26  |  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.