3 getfields, gettokens, tokenize \- break a string into fields
11 int getfields(char *str, char **args, int maxargs, int multiflag,
17 int gettokens(char *str, char **args, int maxargs, char *delims)
20 int tokenize(char *str, char **args, int maxargs)
27 fields of the null terminated
31 Delimiters between these fields are set to null.
33 Fields are substrings of
35 whose definition depends on the value of
40 adjacent fields are separated by exactly one delimiter.
44 getfields("#alice#bob##charles###", arg, 3, 0, "#");
47 yields three substrings:
51 .BR "bob##charles###" .
55 a field is a non-empty string of non-delimiters.
59 getfields("#alice#bob##charles###", arg, 3, 1, "#");
62 yields the three substrings:
68 Getfields returns the number of fields pointed to.
76 except that fields may be quoted using single quotes, in the manner
81 for related quote-handling software.
88 set to \f5"\et\er\en "\fP.
90 .B \*9/src/lib9/tokenize.c