Example #1
0
		inline IntType
		string_to_int_dynamic(sprout::basic_string<Elem, N, 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;
		}
Example #2
0
		inline FloatType string_to_float_dynamic(sprout::basic_string<Elem, N, 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;
		}