Files
mmoat/lib/libft/srcs/str/ft_strcmp.c
Loic Deridder 0bf69437bb lib
2025-01-16 13:57:52 +01:00

12 lines
187 B
C

#include "../../libft.h"
int ft_strcmp(const char *s1, const char *s2)
{
while (*s1 && *s2 && (*s1 == *s2))
{
s1++;
s2++;
}
return ((unsigned char) *s1 - (unsigned char) *s2);
}