Commit 2704d938 authored by Alexander Lapshin's avatar Alexander Lapshin

.

parent 0969b9b3
......@@ -35,6 +35,15 @@ static std::string ToStr(double arg)
return ss.str();
}
static std::string ToStr(double value, int precision)
{
std::ostringstream ss;
ss << std::setprecision(precision);
ss << value;
return ss.str();
}
static void string_replace(std::string& str, const std::string& from, const std::string& to)
{
if (from.empty())
......@@ -46,14 +55,6 @@ static void string_replace(std::string& str, const std::string& from, const std:
}
}
static std::string ToStr(double value, int precision)
{
std::ostringstream ss;
ss << std::setprecision(precision);
ss << value;
return ss.str();
}
static std::string trim_right(const std::string& s, const std::string& t = SPACES)
{
std::string d(s);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment