11 lines
155 B
C
11 lines
155 B
C
|
#include <stddef.h>
|
||
|
|
||
|
int strcmp(const char *s1, const char *s2)
|
||
|
{
|
||
|
size_t i = 0;
|
||
|
|
||
|
while (s1[i] == s2[i] && s1[i] != '\0')
|
||
|
i++;
|
||
|
return s1[i] - s2[i];
|
||
|
}
|