24 #ifndef STORAGE_HUMAN_STRING_H 25 #define STORAGE_HUMAN_STRING_H 36 const unsigned long long B = 1;
37 const unsigned long long KiB = 1024 * B;
38 const unsigned long long MiB = 1024 * KiB;
39 const unsigned long long GiB = 1024 * MiB;
40 const unsigned long long TiB = 1024 * GiB;
41 const unsigned long long PiB = 1024 * TiB;
42 const unsigned long long EiB = 1024 * PiB;
unsigned long long humanstring_to_byte(const std::string &str, bool classic)
Converts a size description using B, KiB, KB, MiB, MB, GiB, GB, TiB, TB, PiB, PB, EiB or EB into an i...
std::string get_suffix(int i, bool classic)
Return a suffix.
int num_suffixes()
Return number of suffixes.
std::string byte_to_humanstring(unsigned long long size, bool classic, int precision, bool omit_zeroes)
Return a pretty description of a size with required precision and using B, KiB, MiB, GiB, TiB, PiB or EiB as unit as appropriate.
The storage namespace.
Definition: Actiongraph.h:37