| Camel Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | ||||
CamelTrie; CamelTrie * camel_trie_new ();gboolean icasevoid camel_trie_free (CamelTrie *trie);void camel_trie_add (CamelTrie *trie,const,gchar *pattern); constgint pattern_idgchar * camel_trie_search (CamelTrie *trie,const,gchar *buffer,gsize buflen);gint *matched_id
CamelTrie * camel_trie_new (gboolean icase);
Creates a new CamelTrie. If icase is TRUE
Since 2.24
void camel_trie_free (CamelTrie *trie);
Frees the memory associated with the CamelTrie trie.
|
The CamelTrie to free. |
Since 2.24
void camel_trie_add (CamelTrie *trie,const,gchar *pattern);gint pattern_id
Add a new pattern to the CamelTrie trie.
|
The CamelTrie to add a pattern to. |
|
The pattern to add. |
|
The id to use for the pattern. |
Since 2.24
constgchar * camel_trie_search (CamelTrie *trie,const,gchar *buffer,gsize buflen);gint *matched_id
Try to match the string buffer with a pattern in trie.
|
The CamelTrie to search in. |
|
The string to match against a pattern in trie. |
|
The length of buffer. |
|
An integer address to store the matched pattern id in. |
Returns : |
The matched pattern, or NULL |
Since 2.24