Next: tokcmp, Previous: str_interp, Up: Strings
match a string to a list of tokens
#include <suplib/str.h>int tokmatch( const char *token, const TokList *toklist );
const char *token
- Not Documented.
const TokList *toklist
- Not Documented.
tokmatch
compares a string to a list of tokens in a user provided
TokList
. The TokList
should be sorted alphabetically by
name.
It returns the id
of the matched token, ‘-1’ otherwise.
Note that this restricts the values of id
.
Diab Jerius