get
Returns the value for the key if any, else null.
Function parameters
Parameters
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 get(self: Self, str: []const u8) ?V {
if (self.kvs.len == 0)
return null;
return self.kvs.values[self.getIndex(str) orelse return null];
}