| 137 | } |
| 138 | |
| 139 | bool StringToFloat(const std::string& str, double* value) { |
| 140 | char* end = nullptr; |
| 141 | double v = std::strtof(str.data(), &end); |
| 142 | if (end == str.data()) { |
| 143 | return false; |
| 144 | } else { |
| 145 | *value = v; |
| 146 | return true; |
| 147 | } |
| 148 | } |
| 149 | |
| 150 | } // namespace |
| 151 |
no test coverage detected