Function

GLibstrv_equal

since: 2.60

Declaration

gboolean
g_strv_equal (
  const gchar* const* strv1,
  const gchar* const* strv2
)

Description

Checks if strv1 and strv2 contain exactly the same elements in exactly the same order. Elements are compared using g_str_equal(). To match independently of order, sort the arrays first (using g_qsort_with_data() or similar).

Two empty arrays are considered equal. Neither strv1 not strv2 may be NULL.

Available since: 2.60

Parameters

strv1

Type: const gchar* const*

A NULL-terminated array of strings.

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

Type: const gchar* const*

Another NULL-terminated array of strings.

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 strv1 and strv2 are equal.