| 631 | } |
| 632 | |
| 633 | double StrToD(const char* b, const char* e, char** se) { |
| 634 | struct TCvt: public StringToDoubleConverter { |
| 635 | inline TCvt() |
| 636 | : StringToDoubleConverter(ALLOW_TRAILING_JUNK | ALLOW_HEX | ALLOW_LEADING_SPACES, 0.0, NAN, nullptr, nullptr) |
| 637 | { |
| 638 | } |
| 639 | }; |
| 640 | |
| 641 | int out = 0; |
| 642 | |
| 643 | const auto res = SingletonWithPriority<TCvt, 0>()->StringToDouble(b, e - b, &out); |
| 644 | |
| 645 | if (se) { |
| 646 | *se = (char*)(b + out); |
| 647 | } |
| 648 | |
| 649 | return res; |
| 650 | } |
| 651 | |
| 652 | double StrToD(const char* b, char** se) { |
| 653 | return StrToD(b, b + strlen(b), se); |
no test coverage detected