append


Description:

public SequenceIter<G> append (owned G data)

Adds a new item to the end of this.

Example: Append a value:

public static int main (string[] args) {
Sequence<string> seq = new Sequence<string> ();
seq.append ("Lorem");
seq.append ("ipsum");
seq.append ("dolor");
seq.append ("sit");
seq.append ("amet");

// Output:
// ``Lorem``
// ``ipsum``
// ``dolor``
// ``sit``
// ``amet``
seq.foreach ((item) => {
print ("%s\n", item);
});

return 0;
}

valac --pkg glib-2.0 GLib.Sequence.append.vala

Parameters:

this

a Sequence

data

the data for the new item

Returns:

an iterator pointing to the new item