Method

GLibStringappend_len

Declaration

GString*
g_string_append_len (
  GString* string,
  const gchar* val,
  gssize len
)

Description

Appends len bytes of val to string.

If len is positive, val may contain embedded nuls and need not be nul-terminated. It is the caller’s responsibility to ensure that val has at least len addressable bytes.

If len is negative, val must be nul-terminated and len is considered to request the entire string length. This makes g_string_append_len() equivalent to g_string_append().

Parameters

val const gchar*
 

Bytes to append.

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

Number of bytes of val to use, or -1 for all of val.

Return value

Returns: GString
 

string.

 The data is owned by the instance.