| 588 | } |
| 589 | |
| 590 | bool StringToInt(int * ival, const char * str, bool failIfLeftoverChars) |
| 591 | { |
| 592 | if(!str) return false; |
| 593 | if(!ival) return false; |
| 594 | |
| 595 | std::istringstream i(str); |
| 596 | i.imbue(std::locale::classic()); |
| 597 | char c=0; |
| 598 | if (!(i >> *ival) || (failIfLeftoverChars && i.get(c))) return false; |
| 599 | return true; |
| 600 | } |
| 601 | |
| 602 | std::string DoubleToString(double value) |
| 603 | { |
no test coverage detected