X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/1347f3d1e04bedd1508589173f577673ee2c5554..3f316b0bda61b18136122406677a2e728af01171:/stglibs/common.lib/common.cpp diff --git a/stglibs/common.lib/common.cpp b/stglibs/common.lib/common.cpp index 787b813d..db2ff6b3 100644 --- a/stglibs/common.lib/common.cpp +++ b/stglibs/common.lib/common.cpp @@ -790,6 +790,14 @@ const std::string & x2str(uint64_t x, std::string & s) return unsigned2str(x, s); } //--------------------------------------------------------------------------- +const std::string & x2str(double x, std::string & s) +{ +char buf[256]; +snprintf(buf, sizeof(buf), "%f", x); +s = buf; +return s; +} +//--------------------------------------------------------------------------- std::string & TrimL(std::string & val) { size_t pos = val.find_first_not_of(" \t");