#include <strings_convert_decl.h>
|
| static bool | convert (const char *from, bool &to) |
| |
| static bool | convert (const char *from, std::int8_t &to) |
| |
| static bool | convert (const char *from, std::int16_t &to) |
| |
| static bool | convert (const char *from, std::int32_t &to) |
| |
| static bool | convert (const char *from, std::int64_t &to) |
| |
| static bool | convert (const char *from, std::uint8_t &to) |
| |
| static bool | convert (const char *from, std::uint16_t &to) |
| |
| static bool | convert (const char *from, std::uint32_t &to) |
| |
| static bool | convert (const char *from, std::uint64_t &to) |
| |
| static bool | convert (const char *from, float &to) |
| |
| static bool | convert (const char *from, double &to) |
| |
Safe convenience string-to-numeric conversion methods for generic programming
◆ convert() [1/11]
| static bool a_util::strings::ToNumericConverter::convert |
( |
const char * | from, |
|
|
bool & | to ) |
|
static |
Safely convert a string to a boolean value.
- Parameters
-
| [in] | from | String to convert. If either "true" or "false" (case insensitive), evaluates to the corresponding boolean value. If numeric, implicit conversion rules apply. |
| [out] | to | Numeric value converted from the string representation. |
- Return values
-
| true | Conversion was successful, to contains the converted value. |
| false | Conversion failed, to is left untouched. |
◆ convert() [2/11]
| static bool a_util::strings::ToNumericConverter::convert |
( |
const char * | from, |
|
|
double & | to ) |
|
static |
Safely convert a string to a numeric value.
- Parameters
-
| [in] | from | String to convert. If the potentially convertible numeric value is not in range of decltype(to) numeric limits, the conversion fails. |
| [out] | to | Numeric value converted from the string representation. |
- Return values
-
| true | Conversion was successful, to contains the converted value. |
| false | Conversion failed, to is left untouched. |
◆ convert() [3/11]
| static bool a_util::strings::ToNumericConverter::convert |
( |
const char * | from, |
|
|
float & | to ) |
|
static |
Safely convert a string to a numeric value.
- Parameters
-
| [in] | from | String to convert. If the potentially convertible numeric value is not in range of decltype(to) numeric limits, the conversion fails. |
| [out] | to | Numeric value converted from the string representation. |
- Return values
-
| true | Conversion was successful, to contains the converted value. |
| false | Conversion failed, to is left untouched. |
◆ convert() [4/11]
| static bool a_util::strings::ToNumericConverter::convert |
( |
const char * | from, |
|
|
std::int16_t & | to ) |
|
static |
Safely convert a string to a numeric value.
- Parameters
-
| [in] | from | String to convert. If the potentially convertible numeric value is not in range of decltype(to) numeric limits, the conversion fails. |
| [out] | to | Numeric value converted from the string representation. |
- Return values
-
| true | Conversion was successful, to contains the converted value. |
| false | Conversion failed, to is left untouched. |
◆ convert() [5/11]
| static bool a_util::strings::ToNumericConverter::convert |
( |
const char * | from, |
|
|
std::int32_t & | to ) |
|
static |
Safely convert a string to a numeric value.
- Parameters
-
| [in] | from | String to convert. If the potentially convertible numeric value is not in range of decltype(to) numeric limits, the conversion fails. |
| [out] | to | Numeric value converted from the string representation. |
- Return values
-
| true | Conversion was successful, to contains the converted value. |
| false | Conversion failed, to is left untouched. |
◆ convert() [6/11]
| static bool a_util::strings::ToNumericConverter::convert |
( |
const char * | from, |
|
|
std::int64_t & | to ) |
|
static |
Safely convert a string to a numeric value.
- Parameters
-
| [in] | from | String to convert. If the potentially convertible numeric value is not in range of decltype(to) numeric limits, the conversion fails. |
| [out] | to | Numeric value converted from the string representation. |
- Return values
-
| true | Conversion was successful, to contains the converted value. |
| false | Conversion failed, to is left untouched. |
◆ convert() [7/11]
| static bool a_util::strings::ToNumericConverter::convert |
( |
const char * | from, |
|
|
std::int8_t & | to ) |
|
static |
Safely convert a string to a numeric value.
- Parameters
-
| [in] | from | String to convert. If the potentially convertible numeric value is not in range of decltype(to) numeric limits, the conversion fails. |
| [out] | to | Numeric value converted from the string representation. |
- Return values
-
| true | Conversion was successful, to contains the converted value. |
| false | Conversion failed, to is left untouched. |
◆ convert() [8/11]
| static bool a_util::strings::ToNumericConverter::convert |
( |
const char * | from, |
|
|
std::uint16_t & | to ) |
|
static |
Safely convert a string to a numeric value.
- Parameters
-
| [in] | from | String to convert. If the potentially convertible numeric value is not in range of decltype(to) numeric limits, the conversion fails. |
| [out] | to | Numeric value converted from the string representation. |
- Return values
-
| true | Conversion was successful, to contains the converted value. |
| false | Conversion failed, to is left untouched. |
◆ convert() [9/11]
| static bool a_util::strings::ToNumericConverter::convert |
( |
const char * | from, |
|
|
std::uint32_t & | to ) |
|
static |
Safely convert a string to a numeric value.
- Parameters
-
| [in] | from | String to convert. If the potentially convertible numeric value is not in range of decltype(to) numeric limits, the conversion fails. |
| [out] | to | Numeric value converted from the string representation. |
- Return values
-
| true | Conversion was successful, to contains the converted value. |
| false | Conversion failed, to is left untouched. |
◆ convert() [10/11]
| static bool a_util::strings::ToNumericConverter::convert |
( |
const char * | from, |
|
|
std::uint64_t & | to ) |
|
static |
Safely convert a string to a numeric value.
- Parameters
-
| [in] | from | String to convert. If the potentially convertible numeric value is not in range of decltype(to) numeric limits, the conversion fails. |
| [out] | to | Numeric value converted from the string representation. |
- Return values
-
| true | Conversion was successful, to contains the converted value. |
| false | Conversion failed, to is left untouched. |
◆ convert() [11/11]
| static bool a_util::strings::ToNumericConverter::convert |
( |
const char * | from, |
|
|
std::uint8_t & | to ) |
|
static |
Safely convert a string to a numeric value.
- Parameters
-
| [in] | from | String to convert. If the potentially convertible numeric value is not in range of decltype(to) numeric limits, the conversion fails. |
| [out] | to | Numeric value converted from the string representation. |
- Return values
-
| true | Conversion was successful, to contains the converted value. |
| false | Conversion failed, to is left untouched. |
The documentation for this struct was generated from the following file: