mirror of
https://github.com/bkaradzic/bx.git
synced 2026-02-21 14:23:03 +01:00
Added prettify for Kilo and Kibi units.
This commit is contained in:
@@ -12,6 +12,15 @@
|
||||
|
||||
namespace bx
|
||||
{
|
||||
struct Units
|
||||
{
|
||||
enum Enum
|
||||
{
|
||||
Kilo,
|
||||
Kibi,
|
||||
};
|
||||
};
|
||||
|
||||
/// Non-zero-terminated string view.
|
||||
class StringView
|
||||
{
|
||||
@@ -212,8 +221,8 @@ namespace bx
|
||||
/// Extract base file name from file path.
|
||||
const char* baseName(const char* _filePath);
|
||||
|
||||
/// Convert size in bytes to human readable string.
|
||||
void prettify(char* _out, int32_t _count, uint64_t _size);
|
||||
/// Convert size in bytes to human readable string kibi units.
|
||||
int32_t prettify(char* _out, int32_t _count, uint64_t _size, Units::Enum _units = Units::Kibi);
|
||||
|
||||
///
|
||||
int32_t toString(char* _out, int32_t _max, double _value);
|
||||
|
||||
Reference in New Issue
Block a user