DoxigAlpha

eqlAsciiIgnoreCase

Like std.ascii.eqlIgnoreCase but takes advantage of the fact that the lengths of a and b are known to be equal.

Function parameters

Parameters

#
a:[]const u8
b:[]const u8

Static string map optimized for small sets of disparate string keys.

Functions

#
StaticStringMap
Static string map optimized for small sets of disparate string keys.
defaultEql
Like `std.mem.eql`, but takes advantage of the fact that the lengths
eqlAsciiIgnoreCase
Like `std.ascii.eqlIgnoreCase` but takes advantage of the fact that
StaticStringMapWithEql
StaticStringMap, but accepts an equality function (`eql`).

Source

Implementation

#
pub fn eqlAsciiIgnoreCase(a: []const u8, b: []const u8) bool {
    if (a.ptr == b.ptr) return true;
    for (a, b) |a_c, b_c| {
        if (std.ascii.toLower(a_c) != std.ascii.toLower(b_c)) return false;
    }
    return true;
}