get_end_iter


Description:

public SequenceIter<G> get_end_iter ()

Returns the end iterator for seg

Example: Get the end iterator:

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:
// ``amet``
// ``sit``
// ``dolor``
// ``ipsum``
// ``Lorem``
SequenceIter<string> iter = seq.get_end_iter ().prev ();
bool has_next = !iter.is_begin ();
while (has_next) {
print ("%d: %s\n", iter.get_position (), iter.get ());
has_next = !iter.is_begin ();
iter = iter.prev ();
}

return 0;
}

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

Parameters:

this

a Sequence

Returns:

the end iterator for this