AppStream.Pool.build_search_tokens

### Method

# AppStream Poolbuild_search_tokens

#### Declaration [src]

    gchar**
    as_pool_build_search_tokens (
      AsPool* pool,
      const gchar* search
    )

#### Description [src]

Splits up a string into an array of tokens that are suitable for searching. This includes stripping whitespaces, casefolding the terms and removing greylist words.

This function is usually called automatically when needed, you will only need to run it explicitly when you need to check which search tokens the pool will actually use internally for a given phrase.

#### Parameters

`search`

  Type: `const gchar*`

  The (user-provided) search phrase.

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

#### Return value

Type: An array of `utf8`

(array zero-terminated=1): Valid tokens to search for, or `NULL` for error.

The array is `NULL`-terminated.
The caller of the method takes ownership of the data, and is responsible for freeing it.
Each element is a NUL terminated UTF-8 string.