smol-gilbraltar/nolibc/strcmp.c

8 lines
150 B
C
Raw Normal View History

2024-12-20 22:45:12 +00:00
#include <string.h>
int strcmp(const char *l, const char *r)
{
for (; *l==*r && *l; l++, r++);
return *(unsigned char *)l - *(unsigned char *)r;
}