mirror of
https://github.com/vivier/EMILE.git
synced 2024-11-14 22:04:43 +00:00
18 lines
221 B
C
18 lines
221 B
C
|
#include <string.h>
|
||
|
|
||
|
int strncmp(const char *__s1, const char *__s2, size_t __n)
|
||
|
{
|
||
|
int tmp;
|
||
|
while (__n--)
|
||
|
{
|
||
|
tmp = *__s1 - *__s2;
|
||
|
if (tmp)
|
||
|
return tmp;
|
||
|
if (!*__s1)
|
||
|
break;
|
||
|
__s1++; __s2++;
|
||
|
}
|
||
|
|
||
|
return 0;
|
||
|
}
|