| 123456789101112131415161718192021222324252627282930 |
- /* ************************************************************************** */
- /* */
- /* ::: :::::::: */
- /* ft_nb_word.c :+: :+: :+: */
- /* +:+ +:+ +:+ */
- /* By: bchanot <bchanot@student.42.fr> +#+ +:+ +#+ */
- /* +#+#+#+#+#+ +#+ */
- /* 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);
- }
|