Subversion Repositories Kolibri OS

Rev

Rev 647 | Go to most recent revision | Blame | Last modification | View Log | Download | RSS feed

  1. #include <string.h>
  2.  
  3. int strcmp(const char* string1, const char* string2)
  4. {
  5.         while (1)
  6.         {
  7.                 if (*string1<*string2)
  8.                         return -1;
  9.                 if (*string1>*string2)
  10.                         return 1;
  11.                 if (*string1=='\0')
  12.                         return 0;
  13.                 string1++;
  14.                 string2++;
  15.         }
  16. }
  17.