std.fmt.Alignment
- Kind
- enum
- Module
std.fmt
Source: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
The entries of std.fmt in the Zig reference. This page has 42 cards.
std.fmtSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn Alt(comptime Data: type, comptime formatFn: fn (data: Data, writer: *Writer) Writer.Error!void) type
Creates a type suitable for instantiating and passing to a "{f}" placeholder.
std.fmtSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn alt(context: anytype, comptime func_name: @EnumLiteral()) Alt(@TypeOf(context), @field(@TypeOf(context), @tagName(func_name)))
Helper for calling alternate format methods besides one named "format".
std.fmtSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.fmtSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.fmtSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn hasUnusedArgs(self: *@This()) bool
std.fmtSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn nextArg(self: *@This(), arg_index: ?usize) ?usize
std.fmtSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn bytesToHex(input: anytype, case: Case) [input.len * 2]u8
Encodes a sequence of bytes as hexadecimal digits.
std.fmtSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.fmtSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn charToDigit(c: u8, base: u8) (error{InvalidCharacter}!u8)
std.fmtSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn comptimePrint(comptime fmt: []const u8, args: anytype) *const [count(fmt, args):0]u8
std.fmtSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn count(comptime fmt: []const u8, args: anytype) usize
Count the characters needed for format.
std.fmtSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.fmtSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn digits2(value: u8) [2]u8
Converts values in the range [0, 100) to a base 10 string.
std.fmtSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn digitToChar(digit: u8, case: Case) u8
std.fmtSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.fmtSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn hex(x: anytype) [@typeInfo(@TypeOf(x)).int.bits / 4]u8
Converts an unsigned integer of any multiple of u8 to an array of lowercase hex bytes, little endian.
std.fmtSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.fmtSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn hexToBytes(out: []u8, input: []const u8) ![]u8
Decodes the sequence of bytes represented by the specified string of hexadecimal characters.
std.fmtSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.fmtSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.fmtSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn base(mode: Mode) ?u8
std.fmtSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.fmtSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn toNumber(o: Options, mode: Number.Mode, case: Case) Number
std.fmtSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn parseFloat(comptime T: type, s: []const u8) ParseFloatError!T
std.fmtSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.fmtSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn parseInt(comptime T: type, buf: []const u8, base: u8) ParseIntError!T
Parses the string `buf` as signed or unsigned representation in the specified base of an integral value of type `T`.
std.fmtSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.fmtSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn parseIntSizeSuffix(buf: []const u8, digit_base: u8) ParseIntError!usize
Parses a number like '2G', '2Gi', or '2GiB'.
std.fmtSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn parseIntWithGenericCharacter(comptime Result: type, comptime Character: type, buf: []const Character, base: u8) ParseIntError!Result
Like `parseInt`, but with a generic `Character` type.
std.fmtSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
A stream based parser for format strings.
std.fmtSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn char(self: *@This()) ?u8
std.fmtSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn maybe(self: *@This(), byte: u8) bool
std.fmtSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn number(self: *@This()) ?usize
std.fmtSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn peek(self: *@This(), i: usize) ?u8
std.fmtSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn specifier(self: *@This()) !Specifier
std.fmtSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn until(self: *@This(), delimiter: u8) []const u8
std.fmtSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub 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`.
std.fmtSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.fmtSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn parse(comptime bytes: []const u8) Placeholder
std.fmtSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn printInt(buffer: []u8, value: anytype, base: u8, case: Case, options: Options) usize
std.fmtSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.fmtSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.