/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_strchr.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: cacharle +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2019/10/07 10:14:47 by cacharle #+# #+# */ /* Updated: 2019/11/20 04:02:02 by cacharle ### ########.fr */ /* */ /* ************************************************************************** */ #include "libft.h" char *ft_strchr(const char *s, int c) { while (*s) { if (*s == (char)c) return ((char*)s); s++; } if ((char)c == '\0') return ((char*)s); return (NULL); }