split a string into tokens
#include <suplib/str.h> int tokqsplit( char *str, char *tok[], const char *delim, int ntok, int split );
char *str
the string to split up
char *tok[]
the array that will receive the tokens
const char *delim
the delimiters to split on
int ntok
the maximum number of tokens to read
int split
the
strtokq
split
argument
tokqsplit
splits a string into a series of tokens using
str_tokq
. It fills a caller provided array with pointers
to the tokens. The caller should specify the maximum number of tokens to
read.
It returns the actual number of tokens in the string, which may differ (either greater and lesser) than the number requested. Upon error, it returns ‘-1’.
Diab Jerius