Zig 0.17.0-dev (Split by item)

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 library itself.

renderValueCIdent

ConfigHeader.renderValueCIdent
fn renderValueCIdent(w: *Writer, newline: []const u8, name: []const u8, ident: []const u8) Writer.Error!void

File

lib/compiler/Maker/Step/ConfigHeader.zig:435

Code

fn renderValueCIdent(w: *Writer, newline: []const u8, name: []const u8, ident: []const u8) Writer.Error!void {
    try w.print("#define {s}", .{name});
    if (ident.len > 0) {
        try w.writeByte(' ');
        try w.writeAll(ident);
    }
    return w.writeAll(newline);
}