/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_strchr.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: vvobis +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/04/03 12:20:50 by vvobis #+# #+# */ /* Updated: 2024/04/09 20:54:14 by vvobis ### ########.fr */ /* */ /* ************************************************************************** */ #include "libft.h" char *ft_strchr(char const *s, int c) { int i; i = 0; while (s[i]) { if (s[i] == (char)c) return ((char *)&s[i]); i++; } if ((char)c == 0) return ((char *)&s[i]); return (NULL); }