smol-gilbraltar/nolibc/strcmp.c
2024-12-20 23:45:12 +01:00

7 lines
150 B
C

#include <string.h>
int strcmp(const char *l, const char *r)
{
for (; *l==*r && *l; l++, r++);
return *(unsigned char *)l - *(unsigned char *)r;
}