k-tana-zero/libs/libc/strcmp.c

11 lines
148 B
C
Raw Normal View History

#include <string.h>
int strcmp(const char *s1, const char *s2)
{
for (; *s1 == *s2 && *s1 != '\0'; s1++, s2++)
continue;
return *s1 - *s2;
}