home *** CD-ROM | disk | FTP | other *** search
/ Aminet 6 / Aminet 6 - June 1995.iso / Aminet / text / hyper / ADtoHT2_0.lha / MyLib.lha / string / strncmp.c < prev    next >
Encoding:
C/C++ Source or Header  |  1995-03-05  |  336 b   |  20 lines

  1. #include <string.h>
  2.  
  3. /************************************************************************/
  4.  
  5. #undef strncmp
  6.  
  7. int strncmp(const char *String1, const char *String2, size_t Size)
  8.  
  9. {
  10.   int Result;
  11.  
  12.   Result=0;
  13.   if (Size != 0)
  14.     {
  15.       while (!(Result=*String1++-*String2) && *String2++ && (--Size != 0))
  16.     ;
  17.     }
  18.   return Result;
  19. }
  20.