inline IntType string_to_int_dynamic(sprout::basic_string_ref<Elem, Traits> const& str, std::size_t* idx, int base = 10) { Elem* endptr = nullptr; IntType result = sprout::detail::str_to_int<IntType>(str.c_str(), &endptr, base); *idx = endptr - str.c_str(); return result; }
inline SPROUT_CONSTEXPR FloatType string_to_float(sprout::basic_string_ref<Elem, Traits> const& str) { return sprout::detail::str_to_float<FloatType>(str.begin()); }
inline SPROUT_CONSTEXPR FloatType string_to_float(sprout::basic_string_ref<Elem, Traits> const& str, std::size_t* idx) { return !idx ? sprout::detail::str_to_float<FloatType>(str.begin()) : sprout::detail::string_to_float_dynamic<FloatType>(str, idx) ; }
inline FloatType string_to_float_dynamic(sprout::basic_string_ref<Elem, Traits> const& str, std::size_t* idx) { Elem* endptr = nullptr; FloatType result = sprout::detail::str_to_float<FloatType>(str.c_str(), &endptr); *idx = endptr - str.c_str(); return result; }
inline SPROUT_CONSTEXPR IntType string_to_int(sprout::basic_string_ref<Elem, Traits> const& str, int base = 10) { return sprout::detail::str_to_int<IntType>(str.begin(), base); }
inline SPROUT_CONSTEXPR IntType string_to_int(sprout::basic_string_ref<Elem, Traits> const& str, std::size_t* idx, int base = 10) { return !idx ? sprout::detail::str_to_int<IntType>(str.begin(), base) : sprout::detail::string_to_int_dynamic<IntType>(str, idx, base) ; }