Function

GLibstpcpy

Declaration

gchar*
g_stpcpy (
  gchar* dest,
  const char* src
)

Description

Copies a nul-terminated string into the dest buffer, include the trailing nul, and return a pointer to the trailing nul byte. This is useful for concatenating multiple strings together without having to repeatedly scan for the end.

Parameters

dest

Type: gchar*

Destination buffer.

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

Type: const char*

Source string.

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

Return value

Type: gchar*

A pointer to trailing nul byte.

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.