### Function

# Gio DesktopAppInfo search

#### Declaration

    gchar***
    g_desktop_app_info_search (
      const gchar* search_string
    )

#### Description

Searches desktop files for ones that match `search_string`.

The return value is an array of strvs. Each strv contains a list of applications that matched `search_string` with an equal score. The outer list is sorted by score so that the first strv contains the best-matching applications, and so on. The algorithm for determining matches is undefined and may change at any time.

None of the search results are subjected to the normal validation checks performed by `g_desktop_app_info_new()` (for example, checking that the executable referenced by a result exists), and so it is possible for `g_desktop_app_info_new()` to return `NULL` when passed an app ID returned by this function. It is expected that calling code will do this when subsequently creating a `GDesktopAppInfo` for each result.

#### Parameters

`search_string`

  Type: `const gchar*`

  The search string to use.

  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 `void`

A list of strvs. Free each item with `g_strfreev()` and free the outer list with g_free().

The array is `NULL`-terminated.
The caller of the function takes ownership of the data, and is responsible for freeing it.