Camel.Trie.search

### Method

# Camel Triesearch

since: 2.24

#### Declaration [src]

    const gchar*
    camel_trie_search (
      CamelTrie* trie,
      const gchar* buffer,
      gsize buflen,
      gint* matched_id
    )

#### Description [src]

Try to match the string `buffer` with a pattern in `trie`.

Available since: 2.24

This method is not directly available to language bindings.

#### Parameters

`buffer`

  Type: An array of `gchar`

  The string to match against a pattern in `trie`.

  The length of the array is specified in the `buflen` argument.
  The data is owned by the caller of the method.

`buflen`

  Type: `gsize`

  The length of `buffer`.

`matched_id`

  Type: `gint*`

  An integer address to store the matched pattern id in.

  The argument will be set by the function.

#### Return value

Type: `const gchar*`

The matched pattern, or `NULL` if no pattern is matched.

The returned data is owned by the instance.
The return value can be `NULL`.
The value is a NUL terminated UTF-8 string.