GLib.String.set_size (original) (raw)

GLib

API Version: 2.0

Library Version: 2.85.1

Type
Methods

Method

GLibStringset_size

Declaration [src]


GString*
g_string_set_size (
  GString* string,
  gsize len
)

Description [src]

Sets the length of a GString. If the length is less than the current length, the string will be truncated. If the length is greater than the current length, the contents of the newly added area are undefined. (However, as always, string->str[string->len] will be a nul byte.).

Parameters

len

Type: gsize

The new length.

Return value

The returned data is owned by the instance.