@set


Description:

[ Version ( deprecated_since = "vala-0.26" , replacement = "SequenceIter.set" ) ]
public static void @set (SequenceIter<G> iter, owned G data)

Warning: @set is deprecated since vala-0.26. Use SequenceIter.set.

Example: Set the item at the specified position:

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

SequenceIter<string> iter = seq.get_iter_at_pos (2);
Sequence<string>.set (iter, "dolor");

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

return 0;
}

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