Commit graph

5 commits

Author SHA1 Message Date
Tim Ledbetter
54539c42c2 AK: Allow human_readable_size_long to use a thousands separator 2023-04-11 13:03:30 +02:00
Arda Cinar
0dbb1be81c AK: Add an option to format numbers with 1000 based units
Instead of only allowing 1024-based units.
2023-01-02 20:11:18 +00:00
Arda Cinar
ccb6b4f943 AK: Make sure no overflow occurs in number_string_with_one_decimal
A possible integer overflow might have occured inside the function in
case (number % unit) * 10 did not fit into a u64. So it is verified that
this does not happen at the beginning of the function.
2023-01-02 20:11:18 +00:00
Arda Cinar
c8fadff9b1 AK: Add a human_readable_quantity helper to NumberFormat.h
This can be used for displaying large quantities that are not measured
in bytes in a more human-readable format.
2023-01-02 20:11:18 +00:00
Arda Cinar
3e924e2a37 AK: Move the functions in NumberFormat.h out of line 2023-01-02 20:11:18 +00:00