Gjsify LogoGjsify Logo

#GStrvBuilder is a method of easily building dynamically sized NULL-terminated string arrays.

The following example shows how to build a two element array:

  g_autoptr(GStrvBuilder) builder = g_strv_builder_new ();
g_strv_builder_add (builder, "hello");
g_strv_builder_add (builder, "world");
g_auto(GStrv) array = g_strv_builder_end (builder);
record

Hierarchy

  • StrvBuilder

Index

Constructors

Properties

Methods

Constructors

Properties

name: string

Methods

  • add(value: string): void
  • addv(value: string[]): void
  • Appends all the strings in the given vector to the builder.

    Since 2.70

    Parameters

    • value: string[]

      the vector of strings to add

    Returns void

  • end(): string[]
  • Ends the builder process and returns the constructed NULL-terminated string array. The returned value should be freed with g_strfreev() when no longer needed.

    Returns string[]

  • unref(): void
  • Decreases the reference count on builder.

    In the event that there are no more references, releases all memory associated with the #GStrvBuilder.

    Returns void

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Type alias with type parameter
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method