home *** CD-ROM | disk | FTP | other *** search
/ DOS/V Power Report 1997 March / VPR9703A.ISO / VPR_DATA / DOGA / SOURCES / REND.LZH / READER / STRCMPI.C < prev    next >
C/C++ Source or Header  |  1992-10-23  |  253b  |  15 lines

  1. #include    <stdio.h>
  2. #include    <string.h>
  3. #define toupper(c) (('a' <= (c) && (c) <= 'z') ? ((c) - 'a' + 'A') : (c))
  4.  
  5.  
  6. int strcmpi(char *p1, char *p2)
  7. {
  8.     for(;*p1 && *p2 && toupper(*p1) == toupper(*p2); p1++, p2++)
  9.         ;
  10.     return *p1 - *p2;
  11. }
  12.  
  13.  
  14.  
  15.