| 459 | } |
| 460 | |
| 461 | bool ParseDouble(const std::string& str, double *out) |
| 462 | { |
| 463 | if (!ParsePrechecks(str)) |
| 464 | return false; |
| 465 | if (str.size() >= 2 && str[0] == '0' && str[1] == 'x') // No hexadecimal floats allowed |
| 466 | return false; |
| 467 | std::istringstream text(str); |
| 468 | text.imbue(std::locale::classic()); |
| 469 | double result; |
| 470 | text >> result; |
| 471 | if(out) *out = result; |
| 472 | return text.eof() && !text.fail(); |
| 473 | } |
| 474 | |
| 475 | std::string FormatParagraph(const std::string in, size_t width, size_t indent) |
| 476 | { |