### Function

# GLib CompletionStrncmpFunc

deprecated: 2.26 since: 2.0

#### Declaration

    gint
    (* GCompletionStrncmpFunc) (
      const gchar* s1,
      const gchar* s2,
      gsize n
    )

#### Description

Specifies the type of the function passed to g_completion_set_compare(). This is used when you use strings as `GCompletion` items.

Available since: 2.0

Deprecated since: 2.26

Rarely used API.

#### Parameters

`s1`

  Type: `const gchar*`

  String to compare with `s2`.

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

`s2`

  Type: `const gchar*`

  String to compare with `s1`.

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

`n`

  Type: `gsize`

  Maximal number of bytes to compare.

#### Return value

Type: `gint`

An integer less than, equal to, or greater than zero if the first `n` bytes of `s1` is found, respectively, to be less than, to match, or to be greater than the first `n` bytes of `s2`.