46 const std::string &str,
49 return std::strtoll(str.c_str(),
nullptr,
false);
53 const std::string &str,
64std::optional<unsigned>
70std::optional<std::size_t>
ait supplies three of the four components needed: an abstract interpreter (in this case handling func...
#define CHECK_RETURN(CONDITION)
std::optional< std::size_t > string2optional_size_t(const std::string &str, int base)
Convert string to size_t similar to the stoul or stoull functions, return nullopt when the conversion...
std::size_t unsafe_string2size_t(const std::string &str, int base)
int unsafe_string2int(const std::string &str, int base)
unsigned long long int unsafe_string2unsignedlonglong(const std::string &str, int base)
unsigned safe_string2unsigned(const std::string &str, int base)
unsigned unsafe_string2unsigned(const std::string &str, int base)
std::size_t safe_string2size_t(const std::string &str, int base)
std::optional< unsigned > string2optional_unsigned(const std::string &str, int base)
Convert string to unsigned similar to the stoul or stoull functions, return nullopt when the conversi...
signed long long int unsafe_string2signedlonglong(const std::string &str, int base)
std::optional< int > string2optional_int(const std::string &str, int base)
Convert string to integer as per stoi, but return nullopt when stoi would throw.