42_KFS_LIB/src/string/strcmp.c
2024-09-06 23:08:48 +02:00

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];
}