DoxigAlpha

defaultEql

Like std.mem.eql, 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 defaultEql(a: []const u8, b: []const u8) bool {
    if (a.ptr == b.ptr) return true;
    for (a, b) |a_elem, b_elem| {
        if (a_elem != b_elem) return false;
    }
    return true;
}