Function CE::Text::Numbers::parse_floats
Defined in File string-numbers.h
Function Documentation
-
inline double CE::Text::Numbers::parse_floats(const std::string &str)
Parse a complete token.
Floating syntax follows stod (including leading space, a sign, and the current C locale); trailing data/space and embedded NULs fail. Integer syntax is base-10 from_chars: no leading space or plus, with a minus only for signed parsing. Invalid syntax throws invalid_args; a numeric value outside the selected parser’s range throws bad_request. Floating parsing accepts stod’s nonfinite values; it adds no finiteness policy.
- Parameters:
str – Complete floating token, borrowed only for this call.
- Throws:
CE::Exceptions::invalid_args – For syntax or incomplete consumption.
CE::Exceptions::bad_request – For stod range failures.
- Returns:
Parsed double, including supported infinities/NaNs.