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.

min_n_digit_int

parse.min_n_digit_int
fn min_n_digit_int(comptime T: type, digit_count: usize) T

File

Code

fn min_n_digit_int(comptime T: type, digit_count: usize) T {
    var n: T = 1;
    var i: usize = 1;
    while (i < digit_count) : (i += 1) n *= 10;
    return n;
}