ArraySort: Case-insensitve array sorting
The ArraySort utility allows arrays of strings to be sorted case-insensitively.
In order to use the ArraySort utility, pass the method
Y.ArraySort.compare
to the JavaScript Array.sort
function:
YUI().use("arraysort", function(Y) { var data_in = ["attic", "Aardvark", "1", "0", "Zoo", "zebra"], sorted_data = data_in.sort(Y.ArraySort.compare) });
YUI().use("arraysort", function(Y) { var data_in = ["attic", "Aardvark", "1", "0", "Zoo", "zebra"], sorted_data = data_in.sort(Y.ArraySort.compare) });