push_nth
Description:
Inserts a new element into this at the given position.
Example: Push nth:
public static int main (string[] args) {
Queue<string> queue = new Queue<string> ();
queue.push_tail ("1");
queue.push_tail ("3");
queue.push_tail ("4");
queue.push_nth ("2", 1);
// Output: ``1 2 3 4``
string item;
while ((item = queue.pop_head ()) != null) {
print ("%s ", item);
}
print ("\n");
return 0;
}
valac --pkg glib-2.0 GLib.Queue.push_nth.vala
Parameters:
this |
a Queue |
data |
the data for the new element |
n |
the position to insert the new element. If |