lq-text: LQT_FindNextWIDMatchingPattern

API t_WID LQT_FindNextWIDMatchingPattern ( db, WID, Pattern, PatternLength, PrefixLength, Matcher, Argument ) t_LQTEXT_Database *db; t_WID WID; unsigned char *Pattern; int PatternLength; int PrefixLength; int (* Matcher)( # ifdef HAVE_PROTO t_LQTEXT_Database *thedb, unsigned char *theString, int theStringLength, unsigned char *thePattern, int thePatternLength, int thePrefixLength, unsigned char *theArgument # endif ); unsigned char *Argument;

Purpose

Returns the lowest WID whose word matches the given pattern, and that is greater than the given WID argument. The pattern is a string, which must be an all-lower-case prefix. The given wildcard character must be either * or ?, to indicate zero or more following characters or exactly one following character, respectively.

The Prefix need not be nul-terminated; the given PrefixLength argument is used to find the end of the prefix.

Returns

The WID on success, and zero on failure.

Errors

Warns if a database format error is detected.

See Also: