Function

PurpleTrieFindCb

Declaration

gboolean
(* PurpleTrieFindCb) (
  const gchar* word,
  gpointer word_data,
  gpointer user_data
)

Description [src]

A function called on every matching substring.

You can decide to count the match or not (for the total number of found words, that is returned by #purple_trie_find). In both cases you can obviously do some processing outside the PurpleTrie object.

If you decide to count the word and PurpleTrie:reset-on-match property is set, no overlapping words will be found - the processing will skip after the end of this word.

Parameters

word const gchar*
 

Found word.

 The data is owned by the caller of the function.
 The value is a NUL terminated UTF-8 string.
word_data gpointer
 

The user data bound with this word, when added with #purple_trie_add.

 The argument can be NULL.
 The data is owned by the caller of the function.
user_data gpointer
 

The user data passed when calling #purple_trie_find.

 The argument can be NULL.
 The data is owned by the caller of the function.

Return value

Returns: gboolean
 

TRUE if the word should be counter, FALSE otherwise.