Skip to content

Commit

Permalink
Added GetMemorySizeString function
Browse files Browse the repository at this point in the history
  • Loading branch information
TheMostDiligent committed Nov 20, 2023
1 parent 3b27cf6 commit 39458ea
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Primitives/interface/FormatString.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,14 @@ StreamType& operator<<(StreamType& Stream, const MemorySizeFormatter<Type>& Arg)
return Stream;
}

template <typename Type>
std::string GetMemorySizeString(Type _size, int _precision = 0, Type _ref_size = 0)
{
std::stringstream ss;
ss << FormatMemorySize(_size, _precision, _ref_size);
return ss.str();
}

namespace TextColorCode
{
static constexpr char Default[] = "\033[39m";
Expand Down

0 comments on commit 39458ea

Please sign in to comment.