MCPcopy Create free account
hub / github.com/WinMerge/winmerge / doubleToFixedStr

Function doubleToFixedStr

Externals/poco/Foundation/src/NumericString.cpp:241–252  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

239
240
241void 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
255std::string& doubleToStr(std::string& str, double value, int precision, int width, char thSep, char decSep)

Callers 3

appendMethod · 0.85
NumericString.cppFile · 0.85
formatMethod · 0.85

Calls 2

ToFixedMethod · 0.80
FinalizeMethod · 0.80

Tested by

no test coverage detected