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.

Options

fmt.Options
pub const Options = struct

File

lib/std/fmt.zig:29

Code

pub const Options = struct {
    precision: ?usize = null,
    width: ?usize = null,
    alignment: Alignment = default_alignment,
    fill: u8 = default_fill_char,

    pub fn toNumber(o: Options, mode: Number.Mode, case: Case) Number {
        return .{
            .mode = mode,
            .case = case,
            .precision = o.precision,
            .width = o.width,
            .alignment = o.alignment,
            .fill = o.fill,
        };
    }
}