1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 04:17:35 +00:00

AK: Allow human_readable_size_long to use a thousands separator

This commit is contained in:
Tim Ledbetter 2023-03-06 17:31:50 +00:00 committed by Jelle Raaijmakers
parent 72ea046b68
commit 54539c42c2
2 changed files with 30 additions and 13 deletions

View file

@ -15,10 +15,15 @@ enum class HumanReadableBasedOn {
Base10
};
DeprecatedString human_readable_size(u64 size, HumanReadableBasedOn based_on = HumanReadableBasedOn::Base2);
DeprecatedString human_readable_quantity(u64 quantity, HumanReadableBasedOn based_on = HumanReadableBasedOn::Base2, StringView unit = "B"sv);
enum class UseThousandsSeparator {
Yes,
No
};
DeprecatedString human_readable_size_long(u64 size);
DeprecatedString human_readable_size(u64 size, HumanReadableBasedOn based_on = HumanReadableBasedOn::Base2, UseThousandsSeparator use_thousands_separator = UseThousandsSeparator::No);
DeprecatedString human_readable_quantity(u64 quantity, HumanReadableBasedOn based_on = HumanReadableBasedOn::Base2, StringView unit = "B"sv, UseThousandsSeparator use_thousands_separator = UseThousandsSeparator::No);
DeprecatedString human_readable_size_long(u64 size, UseThousandsSeparator use_thousands_separator = UseThousandsSeparator::No);
DeprecatedString human_readable_time(i64 time_in_seconds);
DeprecatedString human_readable_digital_time(i64 time_in_seconds);
@ -30,4 +35,5 @@ using AK::human_readable_quantity;
using AK::human_readable_size;
using AK::human_readable_size_long;
using AK::human_readable_time;
using AK::UseThousandsSeparator;
#endif