mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 20:28:11 +00:00
AK+Format: Support default index in replacement field.
The following does now work: outf("{:0{}}", 1, 3); // 001
This commit is contained in:
parent
afa2523724
commit
13ce24de13
3 changed files with 52 additions and 26 deletions
|
@ -119,6 +119,7 @@ TEST_CASE(replacement_field)
|
|||
EXPECT_EQ(String::formatted("{:*<{1}}", 7, 4), "7***");
|
||||
EXPECT_EQ(String::formatted("{:{2}}", -5, 8, 16), " -5");
|
||||
EXPECT_EQ(String::formatted("{{{:*^{1}}}}", 1, 3), "{*1*}");
|
||||
EXPECT_EQ(String::formatted("{:0{}}", 1, 3), "001");
|
||||
}
|
||||
|
||||
TEST_MAIN(Format)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue