remove


Description:

[ CCode ( cname = "g_sequence_remove" ) ]
public void remove ()

Removes the item pointed to by iter.

It is an error to pass the end iterator to this function.

If the sequence has a data destroy function associated with it, this function is called on the data for the removed item.

Example: Remove:

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

SequenceIter<string> iter = seq.get_iter_at_pos (2);
iter.remove ();

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

return 0;
}

valac --pkg glib-2.0 GLib.SequenceIter.remove.vala

Parameters:

iter

a SequenceIter