2023-02-28 16:42:48 -05:00

9 lines
257 B
C++

#include "fast_float/fast_float.h"
double get10(const char* input) {
double result_value;
auto result = fast_float::from_chars(input, input + strlen(input), result_value);
if (result.ec != std::errc()) { return 10; }
return result_value;
}