StrvBuilder

Added in version 2.68.

class StrvBuilder(**kwargs)
Constructors:

new() -> GLib.StrvBuilder

Constructors

class StrvBuilder
classmethod new() StrvBuilder

Creates a new StrvBuilder with a reference count of 1. Use unref() on the returned value when no longer needed.

Added in version 2.68.

Methods

class StrvBuilder
add(value: str) None

Add a string to the end of the array.

Since 2.68

Parameters:

value – a string.

addv(value: Sequence[str]) None

Appends all the strings in the given vector to the builder.

Since 2.70

Parameters:

value – the vector of strings to add

end() list[str]

Ends the builder process and returns the constructed NULL-terminated string array. The returned value should be freed with strfreev() when no longer needed.

take(value: str) None

Add a string to the end of the array. After value belongs to the StrvBuilder and may no longer be modified by the caller.

Since 2.80

Parameters:

value – a string. Ownership of the string is transferred to the StrvBuilder