:right-sidebar: True StrvBuilder =================================================================== .. currentmodule:: gi.repository.GLib .. versionadded:: 2.68 .. class:: StrvBuilder(**kwargs) :no-contents-entry: :Constructors: :: new() -> GLib.StrvBuilder Constructors ------------ .. rst-class:: interim-class .. class:: StrvBuilder :no-index: .. classmethod:: new() -> ~gi.repository.GLib.StrvBuilder Creates a new :obj:`~gi.repository.GLib.StrvBuilder` with a reference count of 1. Use :func:`~gi.repository.GLib.StrvBuilder.unref` on the returned value when no longer needed. .. versionadded:: 2.68 Methods ------- .. rst-class:: interim-class .. class:: StrvBuilder :no-index: .. method:: add(value: str) -> None Add a string to the end of the array. Since 2.68 :param value: a string. .. method:: addv(value: ~typing.Sequence[str]) -> None Appends all the strings in the given vector to the builder. Since 2.70 :param value: the vector of strings to add .. method:: end() -> list[str] Ends the builder process and returns the constructed NULL-terminated string array. The returned value should be freed with :func:`~gi.repository.GLib.strfreev` when no longer needed. .. method:: take(value: str) -> None Add a string to the end of the array. After ``value`` belongs to the :obj:`~gi.repository.GLib.StrvBuilder` and may no longer be modified by the caller. Since 2.80 :param value: a string. Ownership of the string is transferred to the :obj:`~gi.repository.GLib.StrvBuilder`