mirror of
https://github.com/KolibriOS/kolibrios.git
synced 2024-12-14 19:07:09 +03:00
ace23ebbe2
git-svn-id: svn://kolibrios.org@6433 a494cfbc-eb01-0410-851d-a64ba20cac60
15 lines
276 B
C
15 lines
276 B
C
#include <string.h>
|
|
|
|
int strncmp(const char* string1, const char* string2, size_t count)
|
|
{
|
|
while(count>0 && (*string1==*string2))
|
|
{
|
|
if ('\0' == *string1) return 0;
|
|
++string1;
|
|
++string2;
|
|
--count;
|
|
}
|
|
if(count) return (*string1 - *string2);
|
|
return 0;
|
|
}
|