/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_strcmp.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: fgras-ca +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/11/14 16:57:42 by fgras-ca #+# #+# */ /* Updated: 2023/11/14 17:10:27 by fgras-ca ### ########.fr */ /* */ /* ************************************************************************** */ #include "libft.h" int ft_strcmp(const char *s1, const char *s2) { while (*s1 && (*s1 == *s2)) { s1++; s2++; } return (*(const unsigned char *)s1 - *(const unsigned char *)s2); }