Method

GLibStringassign

Declaration

GString*
g_string_assign (
  GString* string,
  const gchar* rval
)

Description

Copies the bytes from a string into a GString, destroying any previous contents. It is rather like the standard strcpy() function, except that you do not have to worry about having enough space to copy the string.

Parameters

rval

Type: const gchar*

The string to copy into string.

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

Return value

Type: GString

string.

The data is owned by the instance.