/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_strcmp_end.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: bchanot +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2016/08/29 03:46:31 by bchanot #+# #+# */ /* Updated: 2018/10/29 12:13:07 by bchanot ### ########.fr */ /* */ /* ************************************************************************** */ #include "libft.h" int ft_strcmp_end(const char *s1, const char *const s2) { size_t len; len = ft_strlen(s2); if (!s2 || !s1 || len > ft_strlen(s1)) return (false); while (*(s1 + len)) s1++; if (!ft_strcmp(s1, s2)) return (true); return (false); }