split a string into tokens
#include <suplib/str.h>int toksplit( char *str, char *tok[], const char *delim, int ntok );
char *str
- the string to split up
char *tok[]
- the array to stick
const char *delim
- the delimiters to split on
int ntok
- the maximum number of tokens to read
toksplit
splits a string into a series of tokens using
strtok
. 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.
Diab Jerius