Next: str_tokenize, Previous: str_rep, Up: Strings
count the number of tokens in a string.
#include <suplib/str.h>size_t str_tokcnt( const char *string, const char *delim );
const char *string
- string to parse
const char *delim
- the delimiters to use
str_tokcnt
determines the number of tokens which would be
returned in the course of calling the strtok
function through
completion. It does not change the passed string.
it returns the number of tokens in the string.
Diab Jerius