Mercurial > minori
diff include/core/strings.h @ 273:f31305b9f60a
*: various code safety changes
this also makes the code build on Qt 5.7. I can't test it though
because I don't have it working... FAIL!
author | Paper <paper@paper.us.eu.org> |
---|---|
date | Thu, 18 Apr 2024 16:53:17 -0400 |
parents | 9a04802848c0 |
children | 1b5c04268d6a |
line wrap: on
line diff
--- a/include/core/strings.h Thu Apr 18 16:51:35 2024 -0400 +++ b/include/core/strings.h Thu Apr 18 16:53:17 2024 -0400 @@ -67,6 +67,7 @@ std::string ToUtf8String(bool b); uint64_t HumanReadableSizeToBytes(const std::string& str); +std::string BytesToHumanReadableSize(uint64_t bytes, int precision = 2); void RemoveLeadingChars(std::string& s, const char c); void RemoveTrailingChars(std::string& s, const char c);