/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_strchr.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: mcolonna +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/10/03 10:43:17 by mcolonna #+# #+# */ /* Updated: 2023/10/10 13:17:35 by mcolonna ### ########.fr */ /* */ /* ************************************************************************** */ #include char *ft_strchr(const char *s, int c) { int i; i = 0; while (s[i]) { if (s[i] == c) return ((char *)s + i); i++; } if (s[i] == c) return ((char *)s + i); return (NULL); }