From the NannyMUD documentation
2000-12-14
NAME
sort_array - Sort an array through a specific sort function.SYNTAX
mixed *sort_array(mixed *array, string sortfunc, object sortob)DESCRIPTION
Sort array calls 'sortfunc' in 'sortob' with two elements from the 'array' as args at a time and the function returns true if arg1 is bigger than arg2 to sort lower to higher in the resulting array and the other way around.EXAMPLE
int string_compare(string a, string b) { // Looks just like comparing integers. LPC is great. return a > b; } // string_compare int cmd_names() { string *names; // Get an unsorted list of names first. names = users() -> query_real_name(); // Now sort it. names = sort_array(names, "string_compare", this_object()); // Then print it. write(implode_nicely(names, "or") + "?\n"); // Succesful execution - return 1. return 1; } // show_names