/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_strchr.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: joelecle +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2020/02/14 17:07:07 by joelecle #+# #+# */ /* Updated: 2020/02/14 17:07:07 by joelecle ### ########lyon.fr */ /* */ /* ************************************************************************** */ #include char *ft_strchr(const char *s, int c) { char ch; ch = (char)c; while (s) { if (*s == ch) return ((char *)s); if (*s == '\0') return (NULL); s++; } return (NULL); }