Returns the lexicographical order of two slices. O(n).
pub fn orderIgnoreCase(lhs: []const u8, rhs: []const u8) std.math.Order
pub fn orderIgnoreCase(lhs: []const u8, rhs: []const u8) std.math.Order {
if (lhs.ptr != rhs.ptr) {
const n = @min(lhs.len, rhs.len);
var i: usize = 0;
while (i < n) : (i += 1) {
switch (std.math.order(toLower(lhs[i]), toLower(rhs[i]))) {
.eq => continue,
.lt => return .lt,
.gt => return .gt,
}
}
}
return std.math.order(lhs.len, rhs.len);
}