Function

GLibref_string_equal

unstable since: 2.84

Declaration [src]

gboolean
g_ref_string_equal (
  const char* str1,
  const char* str2
)

Description [src]

Compares two ref-counted strings for byte-by-byte equality.

It can be passed to g_hash_table_new() as the key equality function, and behaves exactly the same as g_str_equal() (or strcmp()), but can return slightly faster as it can check the string lengths before checking all the bytes.

Available since: 2.84

Parameters

str1

Type: const char*

A reference counted string.

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

Type: const char*

A reference counted string.

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 the strings are equal, otherwise FALSE.