diff options
Diffstat (limited to 'src/lib/util/str.cc')
-rw-r--r-- | src/lib/util/str.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/lib/util/str.cc b/src/lib/util/str.cc index 093cd0580b..0bb7e8f67f 100644 --- a/src/lib/util/str.cc +++ b/src/lib/util/str.cc @@ -340,6 +340,13 @@ dumpAsHex(const uint8_t* data, size_t length) { return (output.str()); } +string +dumpDouble(double val, size_t precision) { + std::stringstream oss; + oss << setprecision(precision) << val; + return (oss.str()); +} + } // namespace str } // namespace util } // namespace isc |