Skip to content

Commit f5af349

Browse files
authored
Merge pull request #2714 from ziglang/fmt-overhaul
Add positional, precision and width support to std.fmt
2 parents de2b0cd + 08e8d30 commit f5af349

File tree

5 files changed

+402
-367
lines changed

5 files changed

+402
-367
lines changed

src-self-hosted/dep_tokenizer.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -998,7 +998,7 @@ fn printCharValues(out: var, bytes: []const u8) !void {
998998

999999
fn printUnderstandableChar(out: var, char: u8) !void {
10001000
if (!std.ascii.isPrint(char) or char == ' ') {
1001-
std.fmt.format(out.context, anyerror, out.output, "\\x{X2}", char) catch {};
1001+
std.fmt.format(out.context, anyerror, out.output, "\\x{X:2}", char) catch {};
10021002
} else {
10031003
try out.write("'");
10041004
try out.write([_]u8{printable_char_tab[char]});

0 commit comments

Comments
 (0)