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.

writeFixingWhitespace

Render.writeFixingWhitespace
fn writeFixingWhitespace(w: *Writer, slice: []const u8) Error!void

File

lib/std/zig/Ast/Render.zig:3191

Code

fn writeFixingWhitespace(w: *Writer, slice: []const u8) Error!void {
    for (slice) |byte| switch (byte) {
        '\t' => try w.splatByteAll(' ', indent_delta),
        '\r' => {},
        else => try w.writeByte(byte),
    };
}