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 && *string1==*string2)
  4.         {
  5.                 if (*string1) return 0;
  6.                 ++string1;
  7.                 ++string2;
  8.                 --count;
  9.         }
  10.         if(count) return (*string1 - *string2);
  11.         return 0;
  12. }