forked from KolibriOS/kolibrios
initial import of metcc project
git-svn-id: svn://kolibrios.org@145 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
14
programs/develop/metcc/trunk/libc/string/strncmp.c
Normal file
14
programs/develop/metcc/trunk/libc/string/strncmp.c
Normal file
@@ -0,0 +1,14 @@
|
||||
int strncmp(const char* string1, const char* string2, int count)
|
||||
{
|
||||
while(count>0)
|
||||
{
|
||||
if (*string1<*string2)
|
||||
return -1;
|
||||
if (*string1>*string2)
|
||||
return 1;
|
||||
if (*string1=='\0')
|
||||
return 0;
|
||||
count--;
|
||||
}
|
||||
return 0;
|
||||
}
|
Reference in New Issue
Block a user