foreach_range
Description:
[ Version ( deprecated_since = "vala-0.26" , replacement = "SequenceIter.foreach_range" ) ]
public static void foreach_range (SequenceIter<G> begin, SequenceIter<G> end, Func<G> func)
public static void foreach_range (SequenceIter<G> begin, SequenceIter<G> end, Func<G> func)
Warning: foreach_range is deprecated since vala-0.26. Use SequenceIter.foreach_range.
Example: Foreach, range:
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");
SequenceIter start = seq.get_iter_at_pos (2);
SequenceIter end = seq.get_end_iter ();
// Output:
// ``dolor``
// ``sit``
// ``amet``
Sequence<string>.foreach_range (start, end, (item) => {
print ("%s\n", item);
});
return 0;
}
valac --pkg glib-2.0 GLib.Sequence.foreach_range.vala