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


4.25 tokcmp

compare two tokens by name

Synopsis

#include <suplib/str.h>

int tokcmp(
  const void *tok1,
  const void *tok2
);

Parameters

const void *tok1

Not Documented.

const void *tok2

Not Documented.

Description

tokcmp compares two TokListToken’s by name. It is suitable for use by bsearch or qsort.

Returns

It returns ‘-1’ if the first token’s name is alphabetically first, ‘0’ if they have the same name, and ‘1’ if the first token’s name follows the second, alphabetically.

Author

Diab Jerius