Klasse StrvBuilder

Alle implementierten Schnittstellen:
PointerInterface

public class StrvBuilder extends Record
`GStrvBuilder` is a helper object to build a %NULL-terminated string arrays.

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

```c
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);

g_assert_true (g_strv_equal (array, (const char *[]) { "hello", "world", NULL }));
```

https://docs.gtk.org/glib/struct.StrvBuilder.html

  • Konstruktordetails

    • StrvBuilder

      public StrvBuilder(PointerContainer pointer)
    • StrvBuilder

      public StrvBuilder()
      Creates a new #GStrvBuilder with a reference count of 1.
      Use g_strv_builder_unref() on the returned value when no longer needed.
  • Methodendetails

    • getClassHandler

      public static ClassHandler getClassHandler()
    • add

      public void add(@Nonnull Str value)
      Add a string to the end of the array.

      Since 2.68
      Parameter:
      value - a string.
    • add

      public void add(String value)
      Add a string to the end of the array.

      Since 2.68
      Parameter:
      value - a string.
    • addMany

      public void addMany(Object... _ellipsis)
      Appends all the given strings to the builder.

      Since 2.70
      Parameter:
      _ellipsis - one or more strings followed by %NULL
    • addv

      public void addv(@Nonnull Strs value)
      Appends all the strings in the given vector to the builder.

      Since 2.70
      Parameter:
      value - the vector of strings to add
    • ref

      public StrvBuilder ref()
      Atomically increments the reference count of @builder by one.
      This function is thread-safe and may be called from any thread.
      Gibt zurück:
      The passed in #GStrvBuilder
    • take

      public void take(@Nonnull Str value)
      Add a string to the end of the array. After @value belongs to the
      #GStrvBuilder and may no longer be modified by the caller.

      Since 2.80
      Parameter:
      value - a string. Ownership of the string is transferred to the #GStrvBuilder
    • unref

      public void unref()
      Decreases the reference count on @builder.

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

      public static long getTypeID()
    • getParentTypeID

      public static long getParentTypeID()
    • getTypeSize

      public static TypeSystem.TypeSize getTypeSize()
    • getParentTypeSize

      public static TypeSystem.TypeSize getParentTypeSize()
    • getInstanceSize

      public static int getInstanceSize()