sort


Description:

public void sort (owned ComparatorFunc<T> func)

Sorts the list in-place using the provided comparison function.

Example:

    var list = new ArrayList<string> (GLib.str_equal);
list.add ("c");
list.add ("a");
list.add ("b");
list.sort ((a, b) => { return strcmp (a, b); });
assert (list.get (0) == "a");

Parameters:

func

the comparison function. Must return negative if a < b, zero if a == b, positive if a > b.