prepend
Description:
Adds a new item to the front of this
Example: Prepend:
public static int main (string[] args) {
Sequence<string> seq = new Sequence<string> ();
seq.prepend ("amet");
seq.prepend ("sit");
seq.prepend ("dolor");
seq.prepend ("ipsum");
seq.prepend ("Lorem");
// Output:
// ``Lorem``
// ``ipsum``
// ``dolor``
// ``sit``
// ``amet``
seq.foreach ((item) => {
print ("%s\n", item);
});
return 0;
}
valac --pkg glib-2.0 GLib.Sequence.prepend.vala
Parameters:
this |
a Sequence |
data |
the data for the new item |
Returns:
an iterator pointing to the new item |