Function

GLibref_string_new

since: 2.58

Declaration [src]

char*
g_ref_string_new (
  const char* str
)

Description [src]

Creates a new reference counted string and copies the contents of str into it.

Available since: 2.58

Parameters

str

Type: const char*

A NUL-terminated string.

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

Return value

Type: char*

The newly created reference counted string.

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.