Function

FwupdPluginstrdup

since: 1.8.11

Declaration [src]

GString*
fu_strdup (
  const gchar* str,
  gsize bufsz,
  gsize offset
)

Description [src]

Copies a string from a buffer of a specified size up to (but not including) NUL.

Available since: 1.8.11

Parameters

str

Type: const gchar*

A string, e.g. test

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

Type: gsize

The maximum size of str.

offset

Type: gsize

The offset to start copying from.

Return value

Type: GString

A GString, possibly of zero size.

The caller of the function takes ownership of the data, and is responsible for freeing it.