Example: Delete a link

public static int main (string[] args) {
SList<string> list = new SList<string> ();
list.append ("1. entry");
list.append ("2. entry");
list.append ("3. entry");
list.append ("4. entry");

unowned SList<string> list4 = list.nth (3);
list.delete_link (list4);

// Out:
// ´´1. entry´´
// ´´2. entry´´
// ´´3. entry´´
foreach (string str in list) {
print ("%s\n", str);
}

return 0;
}

 valac --pkg glib-2.0 GLib.SList.delete_link.vala

See:




2022 vala-language.org