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.

parseInt

Parses the string buf as signed or unsigned representation in the specified base of an integral value of type T.

When base is zero the string prefix is examined to detect the true base:

Ignores '_' character in buf. See also parseUnsigned.

fmt.parseInt
pub fn parseInt(comptime T: type, buf: []const u8, base: u8) ParseIntError!T

File

lib/std/fmt.zig:322

Code

pub fn parseInt(comptime T: type, buf: []const u8, base: u8) ParseIntError!T {
    return parseIntWithGenericCharacter(T, u8, buf, base);
}