/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_strchr.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: bchanot +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2015/11/25 13:32:36 by bchanot #+# #+# */ /* Updated: 2018/10/11 22:27:45 by bchanot ### ########.fr */ /* */ /* ************************************************************************** */ #include "libft.h" char *ft_strchr(const char *s, int c) { if (!s) return (NULL); while (*s != (char)c && *s != '\0') s++; if (*s == (char)c) return ((char *)s); return (NULL); }