This is an example of documentation generated by ZigDoc, an alternative to Zig's built-in Auto Doc feature. See also examples in other modes/formats. The project being documented here (as the example) is the Zig standard library. Private Function
hash32Len0To4
Private Function
std.hash.cityhash.CityHash32.hash32Len0To4
fnhash32Len0To4(str: []constu8) u32
Params
str: []constu8
File
hash/cityhash.zig:51
51525354555657585960
fnhash32Len0To4(str: []constu8) u32 {
constlen: u32 = @as(u32, @truncate(str.len));
varb: u32 = 0;
varc: u32 = 9;
for (str) |v| {
b = b *% c1 +% @as(u32, @bitCast(@as(i32, @intCast(@as(i8, @bitCast(v))))));
c ^= b;
}
returnfmix(mur(b, mur(len, c)));
}