| 239 | |
| 240 | |
| 241 | void doubleToFixedStr(char* buffer, int bufferSize, double value, int precision) |
| 242 | { |
| 243 | using namespace double_conversion; |
| 244 | |
| 245 | StringBuilder builder(buffer, bufferSize); |
| 246 | int flags = DoubleToStringConverter::UNIQUE_ZERO | |
| 247 | DoubleToStringConverter::EMIT_POSITIVE_EXPONENT_SIGN; |
| 248 | DoubleToStringConverter dc(flags, POCO_FLT_INF, POCO_FLT_NAN, POCO_FLT_EXP, |
| 249 | -std::numeric_limits<double>::digits10, std::numeric_limits<double>::digits10, 0, 0); |
| 250 | dc.ToFixed(value, precision, &builder); |
| 251 | builder.Finalize(); |
| 252 | } |
| 253 | |
| 254 | |
| 255 | std::string& doubleToStr(std::string& str, double value, int precision, int width, char thSep, char decSep) |
no test coverage detected