MCPcopy Create free account
hub / github.com/BTCGPU/BTCGPU / ParseDouble

Function ParseDouble

src/utilstrencodings.cpp:341–353  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

339
340
341bool ParseDouble(const std::string& str, double *out)
342{
343 if (!ParsePrechecks(str))
344 return false;
345 if (str.size() >= 2 && str[0] == '0' && str[1] == 'x') // No hexadecimal floats allowed
346 return false;
347 std::istringstream text(str);
348 text.imbue(std::locale::classic());
349 double result;
350 text >> result;
351 if(out) *out = result;
352 return text.eof() && !text.fail();
353}
354
355std::string FormatParagraph(const std::string& in, size_t width, size_t indent)
356{

Callers

nothing calls this directly

Calls 3

ParsePrechecksFunction · 0.70
sizeMethod · 0.45
eofMethod · 0.45

Tested by

no test coverage detected