Array


Object Hierarchy:

Object hierarchy for Array

Description:

[ Compact ]
[ Version ( since = "2.22" ) ]
[ CCode ( ref_function = "g_array_ref" , type_id = "G_TYPE_ARRAY" , unref_function = "g_array_unref" ) ]
public class Array<G>

Contains the public fields of a GArray.

Example: Insert a single value:

public int main (string[] args) {
Array<string> array = new Array<string> ();
array.append_val ("1. entry");
array.append_val ("3. entry");

array.insert_val (1, "2. entry");

// Output:
// ``1. entry``
// ``2. entry``
// ``3. entry``
for (int i = 0; i < array.length ; i++) {
print ("%s\n", array.index (i));
}

return 0;
}

valac --pkg glib-2.0 GLib.Array.insert_val.vala


Namespace: GLib
Package: glib-2.0

Content:

Creation methods:

Methods:

Fields: