fn parseUnsigned(comptime T: type, buf: []const u8, base: u8) ParseIntError!T

Parses the string buf as 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:

  • A prefix of “0b” implies base=2,
  • A prefix of “0o” implies base=8,
  • A prefix of “0x” implies base=16,
  • Otherwise base=10 is assumed.

Ignores ‘_’ character in buf. See also parseInt.

Parameters

T: type,
buf: []const u8,
base: u8,