/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_count.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: cchauvet +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/06/16 18:27:16 by cchauvet #+# #+# */ /* Updated: 2023/06/16 16:29:22 by cchauvet ### ########.fr */ /* */ /* ************************************************************************** */ #include "./extra.h" size_t ft_count(const char *str, char c) { size_t i; size_t out; i = 0; out = 0; while (str[i] != '\0') { if (str[i] == c) out++; i++; } return (out); }