GLib.stpcpy
Description: Reference for GLib.stpcpy

### Function

# GLibstpcpy

since: 2.0

#### Declaration

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

#### Description

Copies a nul-terminated string into the destination buffer, including the trailing nul byte, and returns a pointer to the trailing nul byte in `dest`. The return value is useful for concatenating multiple strings without having to repeatedly scan for the end.

Available since: 2.0

#### 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 the trailing nul byte in `dest`

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.