str_to_arrays.c
unsigned int token_num(char *str)
{
	char *token;
	char sep[] = " \n\t";
	unsigned int i = 0;

	token = strtok(str, sep);
	while (token)
	{
		token = strtok(NULL, sep);
		i++;
	}

	return (i);
}
/**
 * token_num - number of words on a string
 * @str: string to split
 *
 * Return: number of words
 */
number of words on a string
@str: string to split

number of words
number of words on a string @str : string to split number of words
unsigned int token_num(char *str)
{
	char *token;
	char sep[] = " \n\t";
	unsigned int i = 0;
	token = strtok(str, sep);
	while (token)
	{
		token = strtok(NULL, sep);
		i++;
	}
	return (i);
}
unsigned int token_num ( char * str ) { char * token ; char sep [ ] = " \n \t " ; unsigned int i = 0 ; token = strtok ( str , sep ) ; while ( token ) { token = strtok ( NULL , sep ) ; i ++ ; } return ( i ) ; }
token_num - number of words on a string
 @str: string to split
token_num - number of words on a string @str : string to split