Inlined version of string to number conversion functions throwing an exception instead of setting an error code on failure.
More...
#include <numstring.hpp>
|
| static int64_t | toint (const std::string &str, int64_t maxval) |
| | Parsing an integer number from an Ascii string, throwing in case of error. More...
|
| |
| 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. More...
|
| |
| 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. More...
|
| |
| 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. More...
|
| |
| static double | todouble (const std::string &str) |
| | Parsing a double precision floating point number from an Ascii string, throwing in case of error. More...
|
| |
| 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. More...
|
| |
Inlined version of string to number conversion functions throwing an exception instead of setting an error code on failure.
| static double strus::numstring_conv::todouble |
( |
const std::string & |
str | ) |
|
|
inlinestatic |
Parsing a double precision floating point number from an Ascii string, throwing in case of error.
- Parameters
-
| [in] | str | the number to parse as Ascii string |
- Returns
- the number parsed as an unsigned integer
| static double strus::numstring_conv::todouble |
( |
const char * |
str, |
|
|
std::size_t |
len |
|
) |
| |
|
inlinestatic |
Parsing a double precision floating point number from an Ascii string, throwing in case of error.
- Parameters
-
| [in] | str | the number to parse as Ascii string |
| [in] | len | length of str in bytes |
- Returns
- the number parsed as an unsigned integer
| static int64_t strus::numstring_conv::toint |
( |
const std::string & |
str, |
|
|
int64_t |
maxval |
|
) |
| |
|
inlinestatic |
Parsing an integer number from an Ascii string, throwing in case of error.
- Parameters
-
| [in] | str | the number to parse as Ascii string |
| [in] | maxval | the maximum value accepted for the result |
- Returns
- the number parsed as an integer
| static int64_t strus::numstring_conv::toint |
( |
const char * |
str, |
|
|
std::size_t |
len, |
|
|
int64_t |
maxval |
|
) |
| |
|
inlinestatic |
Parsing an integer number from an Ascii string, throwing in case of error.
- Parameters
-
| [in] | str | the number to parse as Ascii string |
| [in] | len | length of str in bytes |
| [in] | maxval | the maximum value accepted for the result |
- Returns
- the number parsed as an integer
| static uint64_t strus::numstring_conv::touint |
( |
const std::string & |
str, |
|
|
uint64_t |
maxval |
|
) |
| |
|
inlinestatic |
Parsing an unsigned integer number from an Ascii string, throwing in case of error.
- Parameters
-
| [in] | str | the number to parse as Ascii string |
| [in] | maxval | the maximum value accepted for the result |
- Returns
- the number parsed as an unsigned integer
| static uint64_t strus::numstring_conv::touint |
( |
const char * |
str, |
|
|
std::size_t |
len, |
|
|
uint64_t |
maxval |
|
) |
| |
|
inlinestatic |
Parsing an unsigned integer number from an Ascii string, throwing in case of error.
- Parameters
-
| [in] | str | the number to parse as Ascii string |
| [in] | len | length of str in bytes |
| [in] | maxval | the maximum value accepted for the result |
- Returns
- the number parsed as an unsigned integer
The documentation for this struct was generated from the following file:
- /home/patrick/Projects/github/strusBase/include/strus/base/numstring.hpp