Function

GLibstrv_contains

since: 2.44

Declaration [src]

gboolean
g_strv_contains (
  const gchar* const* strv,
  const gchar* str
)

Description [src]

Checks if an array of strings contains the string str according to g_str_equal(). strv must not be NULL.

Available since: 2.44

Parameters

strv

Type: An array of gchar*

An array of strings to search in.

The array must be NULL-terminated.
The data is owned by the caller of the function.
Each element is a NUL terminated UTF-8 string.
str

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: gboolean

True if str is an element of strv.