This header provides utilities for printing numeric values in different formats, defined within the Balau::Util::PrettyPrint namespace.
#include <Balau/Util/PrettyPrint.hpp>
The following pretty print functions are currently implemented. More information is available on the API documentation page.
Function name | Description |
---|---|
fixed | Print the value in fixed notation. |
scientific | Print the value in scientific notation. |
metricPrefix | Print the value with a metric prefix. |
binaryPrefix | Print the value with a binary prefix. This is similar to a metric prefix, but uses 2^10 (1024) as the divisor. |
byteValue | Returns a string containing the supplied byte value in terms of B/KB/MB/GB etc. |
duration | Pretty print the duration. |
printHexBytes | Print the value as bytes in hexadecimal. |