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
fnline_hook(self: *PowerpcCpuinfoImpl, key: []constu8, value: []constu8) !bool {
if (mem.eql(u8, key, "cpu")) {
// The model name is often followed by a comma or space and extra// info.inlinefor (cpu_names) |pair| {
constend_index = mem.findAny(u8, value, ", ") orelsevalue.len;
if (mem.eql(u8, value[0..end_index], pair[0])) {
self.model = pair[1];
break;
}
}
// Stop the detection once we've seen the first core.returnfalse;
}
returntrue;
}