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.

printUnderstandableChar

DepTokenizer.printUnderstandableChar
fn printUnderstandableChar(gpa: Allocator, list: *std.ArrayList(u8), char: u8) !void

File

lib/std/Build/Cache/DepTokenizer.zig:1083

Code

fn printUnderstandableChar(gpa: Allocator, list: *std.ArrayList(u8), char: u8) !void {
    if (std.ascii.isPrint(char)) {
        try list.print(gpa, "'{c}'", .{char});
    } else {
        try list.print(gpa, "\\x{X:0>2}", .{char});
    }
}