GtkSource.Completion.fuzzy_match
Description: Reference for GtkSource.Completion.fuzzy_match

### Function

# GtkSource Completionfuzzy_match

#### Declaration [src]

    gboolean
    gtk_source_completion_fuzzy_match (
      const char* haystack,
      const char* casefold_needle,
      guint* priority
    )

#### Description [src]

This helper function can do a fuzzy match for you giving a haystack and casefolded needle.

Casefold your needle using `g_utf8_casefold()` before running the query.

Score will be set with the score of the match upon success. Otherwise, it will be set to zero.

#### Parameters

`haystack`

  Type: `const char*`

  The string to be searched.

  The argument can be `NULL`.
  The data is owned by the caller of the function.
  The value is a NUL terminated UTF-8 string.

`casefold_needle`

  Type: `const char*`

  A `g_utf8_casefold()` version of the needle.

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

`priority`

  Type: `guint*`

  An optional location for the score of the match.

  The argument will be set by the function.
  The argument can be `NULL`.

#### Return value

Type: `gboolean`

`TRUE` if `haystack` matched `casefold_needle`, otherwise `FALSE`.