/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_strchr.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: rparodi +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/11/07 16:32:19 by rparodi #+# #+# */ /* Updated: 2024/04/17 19:44:38 by rparodi ### ########.fr */ /* */ /* ************************************************************************** */ #include "../includes/push_swap.h" char *ft_strchr(const char *s, int c) { unsigned int i; i = 0; if (c == 0) return ((char *)s + ft_len(s)); while (s[i] != '\0') { if (s[i] == (char)c) return ((char *)s + i); i++; } return (NULL); }