1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 21:37:35 +00:00

AK: Add support for keeping trailing zeros in fixed precision floats

This uses the same syntax as zero padding integers:
String::formatted("{:0.5}", 1.234) => "1.23400"
This commit is contained in:
Idan Horowitz 2021-06-19 17:00:31 +03:00 committed by Linus Groh
parent 4d5ffd364a
commit 5e53a690ac
3 changed files with 15 additions and 3 deletions

View file

@ -189,6 +189,7 @@ public:
double value,
u8 base = 10,
bool upper_case = false,
bool zero_pad = false,
Align align = Align::Right,
size_t min_width = 0,
size_t precision = 6,