/* ************************************************************************** */ /* */ /* ::: o_ :::::: ::: */ /* ft_strcmp.c :+: / :+::+: :+: */ /* +:+ > +:++:+ +:+ */ /* By: whaffman +#+ +:+ +#++#++:++#++ */ /* +#+ +#+#+ +#++#+ +#+ \o/ */ /* Created: 2024/11/24 20:06:19 by whaffman #+#+# #+#+# #+# #+# | */ /* Updated: 2024/11/24 20:07:08 by whaffman ### ### ### ### / \ */ /* */ /* ************************************************************************** */ #include int ft_strcmp(const char *s1, const char *s2) { size_t i; i = 0; while (s1[i] && s2[i] && s1[i] == s2[i]) i++; return ((unsigned char)s1[i] - (unsigned char)s2[i]); }