### Function

# GLib strrstr

since: 2.0

#### Declaration

    gchar*
    g_strrstr (
      const gchar* haystack,
      const gchar* needle
    )

#### Description

Searches the string `haystack` for the last occurrence of the string `needle`.

Available since: 2.0

#### Parameters

`haystack`

  Type: `const gchar*`

  A string to search in.

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

`needle`

  Type: `const gchar*`

  The string to search for.

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

#### Return value

Type: `gchar*`

A pointer to the found occurrence, or `NULL` if not found.

The caller of the function takes ownership of the data, and is responsible for freeing it.
The value is a NUL terminated UTF-8 string.