GLib.strrstr (original) (raw)

Function

GLibstrrstr

Declaration [src]


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

Description [src]

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

The fact that this function returns gchar * rather than const gchar * is a historical artifact.

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, orNULL if not found.

The data is owned by the called function.
The return value can be NULL.
The value is a NUL terminated UTF-8 string.