| 177 | |
| 178 | |
| 179 | void floatToFixedStr(char* buffer, int bufferSize, float value, int precision) |
| 180 | { |
| 181 | using namespace double_conversion; |
| 182 | |
| 183 | StringBuilder builder(buffer, bufferSize); |
| 184 | int flags = DoubleToStringConverter::UNIQUE_ZERO | |
| 185 | DoubleToStringConverter::EMIT_POSITIVE_EXPONENT_SIGN; |
| 186 | DoubleToStringConverter dc(flags, POCO_FLT_INF, POCO_FLT_NAN, POCO_FLT_EXP, -std::numeric_limits<float>::digits10, std::numeric_limits<float>::digits10, 0, 0); |
| 187 | dc.ToFixed(value, precision, &builder); |
| 188 | builder.Finalize(); |
| 189 | } |
| 190 | |
| 191 | |
| 192 | std::string& floatToStr(std::string& str, float value, int precision, int width, char thSep, char decSep) |
no test coverage detected