/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_nb_word.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: bchanot +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/02/17 18:19:42 by bchanot #+# #+# */ /* Updated: 2018/10/14 03:27:56 by bchanot ### ########.fr */ /* */ /* ************************************************************************** */ #include "libft.h" size_t ft_nb_word(const char *src) { size_t i; i = 0; while (*src) { while (*src && *src < 33) src++; if (*src) i++; while (*src && *src > 32) src++; } return (i); }