--- layout: site.njk title: zul.sort ---
Helpers for sorting strings and integers
sort.strings(values: [][]const u8, direction: Direction) void
Sorts the values in-place using byte-comparison. The sort is unstable (i.e. there is no guarantee about how duplicate values are ordered with respect to each other). Direction can be .asc or .desc
sort.asciiIgnoreCase(values: [][]const u8, direction: Direction) void
Sorts the values in-place, ignoring ASCII casing. The sort is unstable (i.e. there is no guarantee about how duplicate values are ordered with respect to each other). Direction can be .asc or .desc
sort.number(comptime T: type, values: []T, direction: Direction) void
Sorts the values in-place. The sort is unstable (i.e. there is no guarantee about how duplicate values are ordered with respect to each other). Direction can be .asc or .desc. T must be an integer or float type (i.e. i32, f64).