We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a8130cb commit eb11b31Copy full SHA for eb11b31
lib/std/fmt.zig
@@ -2809,6 +2809,15 @@ test "padding" {
2809
try expectFmt("a====", "{c:=<5}", .{'a'});
2810
}
2811
2812
+test "padding fill char utf" {
2813
+ try expectFmt("──crêpe───", "{s:─^10}", .{"crêpe"});
2814
+ try expectFmt("─────crêpe", "{s:─>10}", .{"crêpe"});
2815
+ try expectFmt("crêpe─────", "{s:─<10}", .{"crêpe"});
2816
+ try expectFmt("────a", "{c:─>5}", .{'a'});
2817
+ try expectFmt("──a──", "{c:─^5}", .{'a'});
2818
+ try expectFmt("a────", "{c:─<5}", .{'a'});
2819
+}
2820
+
2821
test "decimal float padding" {
2822
const number: f32 = 3.1415;
2823
try expectFmt("left-pad: **3.141\n", "left-pad: {d:*>7.3}\n", .{number});
0 commit comments