Next: , Previous: str_interp, Up: Strings   [Contents]


4.24 tokmatch

match a string to a list of tokens

Synopsis

#include <suplib/str.h>

int tokmatch(
  const char *token,
  const TokList *toklist
);

Parameters

const char *token

Not Documented.

const TokList *toklist

Not Documented.

Description

tokmatch compares a string to a list of tokens in a user provided TokList. The TokList should be sorted alphabetically by name.

Returns

It returns the id of the matched token, ‘-1’ otherwise. Note that this restricts the values of id.

Author

Diab Jerius