9 #ifndef _STRUS_NUM_STRING_HPP_INCLUDED
10 #define _STRUS_NUM_STRING_HPP_INCLUDED
85 static int64_t
toint(
const std::string& str, int64_t maxval)
97 static int64_t
toint(
const char* str, std::size_t len, int64_t maxval)
108 static uint64_t
touint(
const std::string& str, uint64_t maxval)
120 static uint64_t
touint(
const char* str, std::size_t len, uint64_t maxval)
141 static double todouble(
const char* str, std::size_t len)
uint64_t uintFromString(const std::string &numstr, uint64_t maxvalue, NumParseError &err)
Parsing an unsigned integer number from an Ascii string.
static int64_t toint(const char *str, std::size_t len, int64_t maxval)
Parsing an integer number from an Ascii string, throwing in case of error.
Definition: numstring.hpp:97
static uint64_t touint(const char *str, std::size_t len, uint64_t maxval)
Parsing an unsigned integer number from an Ascii string, throwing in case of error.
Definition: numstring.hpp:120
static uint64_t touint(const std::string &str, uint64_t maxval)
Parsing an unsigned integer number from an Ascii string, throwing in case of error.
Definition: numstring.hpp:108
Definition: numstring.hpp:19
Inlined version of string to number conversion functions throwing an exception instead of setting an ...
Definition: numstring.hpp:79
const char * numstring_error(NumParseError errcode)
Convert string conversion error code into an error message string.
Definition: numstring.hpp:18
std::runtime_error numstring_exception(NumParseError errcode)
Convert string conversion error code into an exception.
static double todouble(const char *str, std::size_t len)
Parsing a double precision floating point number from an Ascii string, throwing in case of error...
Definition: numstring.hpp:141
double doubleFromString(const std::string &numstr, NumParseError &err)
Parsing a double precision floating point number from an Ascii string.
int64_t intFromString(const std::string &numstr, int64_t maxvalue, NumParseError &err)
Parsing an integer number from an Ascii string.
static double todouble(const std::string &str)
Parsing a double precision floating point number from an Ascii string, throwing in case of error...
Definition: numstring.hpp:130
Definition: numstring.hpp:22
NumParseError
Definition: numstring.hpp:17
Definition: numstring.hpp:21
Definition: numstring.hpp:20
static int64_t toint(const std::string &str, int64_t maxval)
Parsing an integer number from an Ascii string, throwing in case of error.
Definition: numstring.hpp:85