Subversion Repositories Kolibri OS

Rev

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

  1. int strncmp(const char* string1, const char* string2, int count)
  2. {
  3.         while(count>0)
  4.         {
  5.                 if (*string1<*string2)
  6.                         return -1;
  7.                 if (*string1>*string2)
  8.                         return 1;
  9.                 if (*string1=='\0')
  10.                         return 0;
  11.                 count--;
  12.         }      
  13.         return 0;
  14. }
  15.