Function fmtChar [src]

Return a formatter for escaping a single quoted Zig string.

Prototype

pub fn fmtChar(c: u21) std.fmt.Alt(u21, charEscape)

Parameters

c: u21

Example

test fmtChar { try std.testing.expectFmt("c \\u{26a1}", "{f} {f}", .{ fmtChar('c'), fmtChar('⚡') }); }

Source

pub fn fmtChar(c: u21) std.fmt.Alt(u21, charEscape) { return .{ .data = c }; }