clean up main
This commit is contained in:
@@ -11,6 +11,13 @@ std::string pNum(float num, uint8_t decs) {
|
||||
return pNum((double)num, decs);
|
||||
}
|
||||
|
||||
// pads given string to length
|
||||
std::string pad(std::string s, uint8_t len, bool ljust) {
|
||||
if (len > s.size())
|
||||
s.insert(ljust ? s.end() : s.begin(), len - s.size(), FILL_CHAR);
|
||||
return s;
|
||||
}
|
||||
|
||||
|
||||
// converts large number in (k)bytes to human readable numer with suffix and sane decimal
|
||||
std::string pBytes(double bytes, bool isKbytes) {
|
||||
|
||||
Reference in New Issue
Block a user