|
Dev Essential
1.6.3
|
Serves as component for string handling and conversion functionality. More...
Namespaces | |
| namespace | unicode |
| Serves as component for unicode (UTF-8, UTF-16) string handling. | |
Classes | |
| struct | IsNumericConvertible |
| struct | ToNumericConverter |
Functions | |
| template<typename Numeric> | |
| bool | toNumeric (const char *from, Numeric &to) |
| template<typename Numeric> | |
| bool | toNumeric (const std::string &from, Numeric &to) |
| template<typename Numeric> | |
| Numeric | toNumeric (const char *from) |
| template<typename Numeric> | |
| Numeric | toNumeric (const std::string &from) |
| template<typename Numeric> | |
| bool | isNumeric (const char *str) |
| template<typename Numeric> | |
| bool | isNumeric (const std::string &str) |
| bool | toBool (const std::string &from, bool &to) |
| bool | toInt8 (const std::string &from, std::int8_t &to) |
| bool | toInt16 (const std::string &from, std::int16_t &to) |
| bool | toInt32 (const std::string &from, std::int32_t &to) |
| bool | toInt64 (const std::string &from, std::int64_t &to) |
| bool | toUInt8 (const std::string &from, std::uint8_t &to) |
| bool | toUInt16 (const std::string &from, std::uint16_t &to) |
| bool | toUInt32 (const std::string &from, std::uint32_t &to) |
| bool | toUInt64 (const std::string &from, std::uint64_t &to) |
| bool | toFloat (const std::string &from, float &to) |
| bool | toDouble (const std::string &from, double &to) |
| bool | toBool (const char *from, bool &to) |
| bool | toInt8 (const char *from, std::int8_t &to) |
| bool | toInt16 (const char *from, std::int16_t &to) |
| bool | toInt32 (const char *from, std::int32_t &to) |
| bool | toInt64 (const char *from, std::int64_t &to) |
| bool | toUInt8 (const char *from, std::uint8_t &to) |
| bool | toUInt16 (const char *from, std::uint16_t &to) |
| bool | toUInt32 (const char *from, std::uint32_t &to) |
| bool | toUInt64 (const char *from, std::uint64_t &to) |
| bool | toFloat (const char *from, float &to) |
| bool | toDouble (const char *from, double &to) |
| bool | toBool (const std::string &from) |
| std::int8_t | toInt8 (const std::string &from) |
| std::int16_t | toInt16 (const std::string &from) |
| std::int32_t | toInt32 (const std::string &from) |
| std::int64_t | toInt64 (const std::string &from) |
| std::uint8_t | toUInt8 (const std::string &from) |
| std::uint16_t | toUInt16 (const std::string &from) |
| std::uint32_t | toUInt32 (const std::string &from) |
| std::uint64_t | toUInt64 (const std::string &from) |
| float | toFloat (const std::string &from) |
| double | toDouble (const std::string &from) |
| bool | toBool (const char *from) |
| std::int8_t | toInt8 (const char *from) |
| std::int16_t | toInt16 (const char *from) |
| std::int32_t | toInt32 (const char *from) |
| std::int64_t | toInt64 (const char *from) |
| std::uint8_t | toUInt8 (const char *from) |
| std::uint16_t | toUInt16 (const char *from) |
| std::uint32_t | toUInt32 (const char *from) |
| std::uint64_t | toUInt64 (const char *from) |
| float | toFloat (const char *from) |
| double | toDouble (const char *from) |
| std::string | format (const char *str_format,...) |
| std::string | format (std::size_t initial_buffer_size, const char *str_format,...) |
| std::string & | format (std::string &buffer, std::size_t &pos, const char *str_format,...) |
| std::string | toString (bool from) |
| std::string | toString (std::int8_t from) |
| std::string | toString (std::int16_t from) |
| std::string | toString (std::int32_t from) |
| std::string | toString (std::int64_t from) |
| std::string | toString (std::uint8_t from) |
| std::string | toString (std::uint16_t from) |
| std::string | toString (std::uint32_t from) |
| std::string | toString (std::uint64_t from) |
| std::string | toString (float from) |
| std::string | toString (double from) |
| int | compare (const char *left, const char *right) |
| int | compare (const char *left, const char *right, std::size_t pos) |
| int | compare (const char *left, const char *right, std::size_t pos, std::size_t length) |
| int | compareNoCase (const char *left, const char *right) |
| int | compareNoCase (const char *left, const char *right, std::size_t pos) |
| int | compareNoCase (const char *left, const char *right, std::size_t pos, std::size_t length) |
| bool | isEqual (const char *left, const char *right) |
| bool | isEqual (const char *left, const char *right, std::size_t pos) |
| bool | isEqual (const char *left, const char *right, std::size_t pos, std::size_t length) |
| bool | isEqualNoCase (const char *left, const char *right) |
| bool | isEqualNoCase (const char *left, const char *right, std::size_t pos) |
| bool | isEqualNoCase (const char *left, const char *right, std::size_t pos, std::size_t length) |
| std::size_t | getLength (const char *str) |
| std::size_t | copy (char *dest, std::size_t dest_size, const char *source) |
| std::size_t | copy (char *dest, std::size_t dest_size, const char *source, std::size_t count) |
| std::vector< std::string > | split (const std::string &str, const std::string &separator) |
| std::vector< std::string > | split (const std::string &str, const std::string &separator, bool keep_empty) |
| std::vector< std::string > | splitToken (const std::string &str) |
| std::vector< std::string > | splitToken (const std::string &str, const std::string &separators) |
| std::vector< std::string > | splitToken (const std::string &str, const std::string &separators, bool keep_empty) |
| std::string & | trim (std::string &str) |
| std::string & | trim (std::string &str, const std::string &trimmed_chars) |
| bool | isEmpty (const char *str) |
| bool | isNotEmpty (const char *str) |
| std::string & | replace (std::string &str, const std::string &subject, const std::string &replacement) |
| std::string | replace (const std::string &str, const std::string &subject, const std::string &replacement) |
| std::string | join (const std::vector< std::string > &strings, const std::string &delimiter) |
| bool | isBool (const std::string &str) |
| bool | isInt8 (const std::string &str) |
| bool | isInt16 (const std::string &str) |
| bool | isInt32 (const std::string &str) |
| bool | isInt64 (const std::string &str) |
| bool | isUInt8 (const std::string &str) |
| bool | isUInt16 (const std::string &str) |
| bool | isUInt32 (const std::string &str) |
| bool | isUInt64 (const std::string &str) |
| bool | isFloat (const std::string &str) |
| bool | isDouble (const std::string &str) |
| bool | isBool (const char *str) |
| bool | isInt8 (const char *str) |
| bool | isInt16 (const char *str) |
| bool | isInt32 (const char *str) |
| bool | isInt64 (const char *str) |
| bool | isUInt8 (const char *str) |
| bool | isUInt16 (const char *str) |
| bool | isUInt32 (const char *str) |
| bool | isUInt64 (const char *str) |
| bool | isFloat (const char *str) |
| bool | isDouble (const char *str) |
Variables | |
| const std::string | white_space |
| Contains all whitespaces (" \t\n\r") | |
| const std::string | empty_string |
| Contains the empty string. | |
Serves as component for string handling and conversion functionality.
| int a_util::strings::compare | ( | const char * | left, |
| const char * | right ) |
Compares two 0-terminated C-strings
| left | [in] The left string in the comparison |
| right | [in] The right string in the comparison |
nullptr, or > 0 if the left string is greater than the right string or a nullptr. | int a_util::strings::compare | ( | const char * | left, |
| const char * | right, | ||
| std::size_t | pos ) |
Compares two 0-terminated C-strings
| left | [in] The left string in the comparison |
| right | [in] The right string in the comparison |
| pos | [in] Compare from position pos |
nullptr, or > 0 if the left string is greater than the right string or a nullptr. | int a_util::strings::compare | ( | const char * | left, |
| const char * | right, | ||
| std::size_t | pos, | ||
| std::size_t | length ) |
Compares two 0-terminated C-strings
| left | [in] The left string in the comparison |
| right | [in] The right string in the comparison |
| pos | [in] Compare from position pos |
| length | [in] Compare only length characters |
nullptr, or > 0 if the left string is greater than the right string or a nullptr. | int a_util::strings::compareNoCase | ( | const char * | left, |
| const char * | right ) |
Compares two 0-terminated C-strings, ignoring the case using _tcsicmp. The generic-text function _tcsicmp, maps to either _stricmp, _wcsicmp, _mbsicmp depending on the character set that is defined at compile time. Each of these functions performs a case-insensitive comparison of the strings, and is not affected by locale.
| left | [in] The left string in the comparison |
| right | [in] The right string in the comparison |
nullptr, or > 0 if the left string is greater the right string (ignoring case) or a nullptr. | int a_util::strings::compareNoCase | ( | const char * | left, |
| const char * | right, | ||
| std::size_t | pos ) |
Compares two 0-terminated C-strings, ignoring the case using _tcsicmp. The generic-text function _tcsicmp, maps to either _stricmp, _wcsicmp, _mbsicmp depending on the character set that is defined at compile time. Each of these functions performs a case-insensitive comparison of the strings, and is not affected by locale.
| left | [in] The left string in the comparison |
| right | [in] The right string in the comparison |
| pos | [in] Compare from position pos |
nullptr, or > 0 if the left string is greater the right string (ignoring case) or a nullptr. | int a_util::strings::compareNoCase | ( | const char * | left, |
| const char * | right, | ||
| std::size_t | pos, | ||
| std::size_t | length ) |
Compares two 0-terminated C-strings, ignoring the case using _tcsicmp. The generic-text function _tcsicmp, maps to either _stricmp, _wcsicmp, _mbsicmp depending on the character set that is defined at compile time. Each of these functions performs a case-insensitive comparison of the strings, and is not affected by locale.
| left | [in] The left string in the comparison |
| right | [in] The right string in the comparison |
| pos | [in] Compare from position pos |
| length | [in] Compare only length characters |
nullptr, or > 0 if the left string is greater the right string (ignoring case) or a nullptr. | std::size_t a_util::strings::copy | ( | char * | dest, |
| std::size_t | dest_size, | ||
| const char * | source ) |
Copies up to dest_size-1 characters from source to dest, ensuring null termination
| dest | [in] Destination buffer |
| dest_size | [in] Destination buffer size |
| source | [in] Source string (0-terminated) |
| std::size_t a_util::strings::copy | ( | char * | dest, |
| std::size_t | dest_size, | ||
| const char * | source, | ||
| std::size_t | count ) |
Copies up to count characters from source to dest, ensuring null termination
| dest | [in] Destination buffer |
| dest_size | [in] Destination buffer size |
| source | [in] Source string (0-terminated) |
| count | [in] Maximum number of characters to copy |
| std::string a_util::strings::format | ( | const char * | str_format, |
| ... ) |
printf()-like formatting of an input string.
| [in] | str_format | The formatting string. |
| [in] | ... | vargs to create the formatted string from. |
| std::string a_util::strings::format | ( | std::size_t | initial_buffer_size, |
| const char * | str_format, | ||
| ... ) |
printf()-like formatting of an input string with a given destination string buffer size.
| [in] | initial_buffer_size | Initial allocyted size of the string buffer. Always pass size +1 for terminating 0-character. |
| [in] | str_format | The formatting string. |
| [in] | ... | vargs to create the formatted string from. |
| std::string & a_util::strings::format | ( | std::string & | buffer, |
| std::size_t & | pos, | ||
| const char * | str_format, | ||
| ... ) |
printf()-like formatting of an input string with a given destination string buffer.
| [in,out] | buffer | Destination buffer for the formatted string. |
| [in,out] | pos | Starting position in the buffer where the formatted string gets written to. After successful execution, gets set to the position of the last written character in the buffer. |
| [in] | str_format | The formatting string. |
| [in] | ... | vargs to create the formatted string from. |
buffer). | std::size_t a_util::strings::getLength | ( | const char * | str | ) |
Counts the number of characters in a 0-terminated C-string
| str | [in] The C-string |
nullptr | bool a_util::strings::isBool | ( | const char * | str | ) |
Check whether a string can be converted to a boolean type.
| [in] | str | The string to check. |
true if the string can be converted, false otherwise. | bool a_util::strings::isBool | ( | const std::string & | str | ) |
Check whether a string can be converted to a boolean type.
| [in] | str | The string to check. |
true if the string can be converted, false otherwise. | bool a_util::strings::isDouble | ( | const char * | str | ) |
Check whether a string can be converted to a value of the given numeric type.
| [in] | str | The string to check. |
true if the string can be converted, false otherwise. | bool a_util::strings::isDouble | ( | const std::string & | str | ) |
Check whether a string can be converted to a value of the given numeric type.
| [in] | str | The string to check. |
true if the string can be converted, false otherwise. | bool a_util::strings::isEmpty | ( | const char * | str | ) |
Checks whether a C-style string is empty, meaning nullptr or ""
| [in] | str | C-style string to check - must either be nullptr or 0-terminated |
| bool a_util::strings::isEqual | ( | const char * | left, |
| const char * | right ) |
Compares two 0-terminated C-strings for equality
| left | [in] The left string in the comparison |
| right | [in] The right string in the comparison |
| bool a_util::strings::isEqual | ( | const char * | left, |
| const char * | right, | ||
| std::size_t | pos ) |
Compares two 0-terminated C-strings for equality
| left | [in] The left string in the comparison |
| right | [in] The right string in the comparison |
| pos | [in] Compare from position pos |
| bool a_util::strings::isEqual | ( | const char * | left, |
| const char * | right, | ||
| std::size_t | pos, | ||
| std::size_t | length ) |
Compares two 0-terminated C-strings for equality
| left | [in] The left string in the comparison |
| right | [in] The right string in the comparison |
| pos | [in] Compare from position pos |
| length | [in] Compare only length characters |
| bool a_util::strings::isEqualNoCase | ( | const char * | left, |
| const char * | right ) |
Compares two 0-terminated C-strings for equality ignoring their case
| left | [in] The left string in the comparison |
| right | [in] The right string in the comparison |
| bool a_util::strings::isEqualNoCase | ( | const char * | left, |
| const char * | right, | ||
| std::size_t | pos ) |
Compares two 0-terminated C-strings for equality ignoring their case
| left | [in] The left string in the comparison |
| right | [in] The right string in the comparison |
| pos | [in] Compare from position pos |
| bool a_util::strings::isEqualNoCase | ( | const char * | left, |
| const char * | right, | ||
| std::size_t | pos, | ||
| std::size_t | length ) |
Compares two 0-terminated C-strings for equality ignoring their case
| left | [in] The left string in the comparison |
| right | [in] The right string in the comparison |
| pos | [in] Compare from position pos |
| length | [in] Compare only length characters |
| bool a_util::strings::isFloat | ( | const char * | str | ) |
Check whether a string can be converted to a value of the given numeric type.
| [in] | str | The string to check. |
true if the string can be converted, false otherwise. | bool a_util::strings::isFloat | ( | const std::string & | str | ) |
Check whether a string can be converted to a value of the given numeric type.
| [in] | str | The string to check. |
true if the string can be converted, false otherwise. | bool a_util::strings::isInt16 | ( | const char * | str | ) |
Check whether a string can be converted to a value of the given numeric type.
| [in] | str | The string to check. |
true if the string can be converted, false otherwise. | bool a_util::strings::isInt16 | ( | const std::string & | str | ) |
Check whether a string can be converted to a value of the given numeric type.
| [in] | str | The string to check. |
true if the string can be converted, false otherwise. | bool a_util::strings::isInt32 | ( | const char * | str | ) |
Check whether a string can be converted to a value of the given numeric type.
| [in] | str | The string to check. |
true if the string can be converted, false otherwise. | bool a_util::strings::isInt32 | ( | const std::string & | str | ) |
Check whether a string can be converted to a value of the given numeric type.
| [in] | str | The string to check. |
true if the string can be converted, false otherwise. | bool a_util::strings::isInt64 | ( | const char * | str | ) |
Check whether a string can be converted to a value of the given numeric type.
| [in] | str | The string to check. |
true if the string can be converted, false otherwise. | bool a_util::strings::isInt64 | ( | const std::string & | str | ) |
Check whether a string can be converted to a value of the given numeric type.
| [in] | str | The string to check. |
true if the string can be converted, false otherwise. | bool a_util::strings::isInt8 | ( | const char * | str | ) |
Check whether a string can be converted to a value of the given numeric type.
| [in] | str | The string to check. |
true if the string can be converted, false otherwise. | bool a_util::strings::isInt8 | ( | const std::string & | str | ) |
Check whether a string can be converted to a value of the given numeric type.
| [in] | str | The string to check. |
true if the string can be converted, false otherwise. | bool a_util::strings::isNotEmpty | ( | const char * | str | ) |
Checks whether a C-style string is not empty, meaning neither nullptr nor ""
| [in] | str | C-style string to check - must either be nullptr or 0-terminated |
!isEmpty(str) | bool a_util::strings::isNumeric | ( | const char * | str | ) |
Check whether a string is convertible to a value of type Numeric for generic programming.
| Numeric | The numeric type. |
| [in] | str | The string to check. |
true if valid numeric value, false otherwise. | bool a_util::strings::isNumeric | ( | const std::string & | str | ) |
Check whether a string is convertible to a value of type Numeric for generic programming.
| Numeric | The numeric type. |
| [in] | str | The string to check. |
true if valid numeric value, false otherwise. | bool a_util::strings::isUInt16 | ( | const char * | str | ) |
Check whether a string can be converted to a value of the given numeric type.
| [in] | str | The string to check. |
true if the string can be converted, false otherwise. | bool a_util::strings::isUInt16 | ( | const std::string & | str | ) |
Check whether a string can be converted to a value of the given numeric type.
| [in] | str | The string to check. |
true if the string can be converted, false otherwise. | bool a_util::strings::isUInt32 | ( | const char * | str | ) |
Check whether a string can be converted to a value of the given numeric type.
| [in] | str | The string to check. |
true if the string can be converted, false otherwise. | bool a_util::strings::isUInt32 | ( | const std::string & | str | ) |
Check whether a string can be converted to a value of the given numeric type.
| [in] | str | The string to check. |
true if the string can be converted, false otherwise. | bool a_util::strings::isUInt64 | ( | const char * | str | ) |
Check whether a string can be converted to a value of the given numeric type.
| [in] | str | The string to check. |
true if the string can be converted, false otherwise. | bool a_util::strings::isUInt64 | ( | const std::string & | str | ) |
Check whether a string can be converted to a value of the given numeric type.
| [in] | str | The string to check. |
true if the string can be converted, false otherwise. | bool a_util::strings::isUInt8 | ( | const char * | str | ) |
Check whether a string can be converted to a value of the given numeric type.
| [in] | str | The string to check. |
true if the string can be converted, false otherwise. | bool a_util::strings::isUInt8 | ( | const std::string & | str | ) |
Check whether a string can be converted to a value of the given numeric type.
| [in] | str | The string to check. |
true if the string can be converted, false otherwise. | std::string a_util::strings::join | ( | const std::vector< std::string > & | strings, |
| const std::string & | delimiter ) |
Joins all strings from the vector into one string, separated by the specified delimiter string
| [in] | strings | The vector of strings |
| [in] | delimiter | The delimiter string |
| std::string a_util::strings::replace | ( | const std::string & | str, |
| const std::string & | subject, | ||
| const std::string & | replacement ) |
Replace all occurences of subject with replacement
| [in] | str | The string |
| [in] | subject | The subject string to search for |
| [in] | replacement | The replacement string to substitute |
| std::string & a_util::strings::replace | ( | std::string & | str, |
| const std::string & | subject, | ||
| const std::string & | replacement ) |
In-place replacement of all occurences of subject with replacement
| [in,out] | str | The string |
| [in] | subject | The subject string to search for |
| [in] | replacement | The replacement string to substitute |
str, after replacement | std::vector< std::string > a_util::strings::split | ( | const std::string & | str, |
| const std::string & | separator ) |
Splits a string using a specified separator string
| str | [in] The string |
| separator | [in] The separator string |
| std::vector< std::string > a_util::strings::split | ( | const std::string & | str, |
| const std::string & | separator, | ||
| bool | keep_empty ) |
Splits a string using a specified separator string
| str | [in] The string |
| separator | [in] The separator string |
| keep_empty | [in] Flag whether to keep empty parts in the result vector |
| std::vector< std::string > a_util::strings::splitToken | ( | const std::string & | str | ) |
Splits a string on whitespace characters
| str | [in] The string |
| std::vector< std::string > a_util::strings::splitToken | ( | const std::string & | str, |
| const std::string & | separators ) |
Splits a string using a set of separator characters
| str | [in] The string |
| separators | [in] The set of separator characters |
| std::vector< std::string > a_util::strings::splitToken | ( | const std::string & | str, |
| const std::string & | separators, | ||
| bool | keep_empty ) |
Splits a string using a set of separator characters
| str | [in] The string |
| separators | [in] The set of separator characters |
| keep_empty | [in] Flag whether to keep empty parts in the result vector |
| bool a_util::strings::toBool | ( | const char * | from | ) |
Convert a string to a boolean value.
| [in] | from | String to convert. If either "true" or "false" (case insensitive), evaluates to the corresponding boolean value. If numeric, implicit conversion rules apply. |
| bool a_util::strings::toBool | ( | const char * | from, |
| bool & | to ) |
Safely convert a string to a boolean value.
| [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 | Boolean value converted from the string representation. |
| true | Conversion was successful, to contains the converted value. |
| false | Conversion failed, to is left untouched. |
| bool a_util::strings::toBool | ( | const std::string & | from | ) |
Convert a string to a boolean value.
| [in] | from | String to convert. If either "true" or "false" (case insensitive), evaluates to the corresponding boolean value. If numeric, implicit conversion rules apply. |
| bool a_util::strings::toBool | ( | const std::string & | from, |
| bool & | to ) |
Safely convert a string to a boolean value.
| [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 | Boolean value converted from the string representation. |
| true | Conversion was successful, to contains the converted value. |
| false | Conversion failed, to is left untouched. |
| double a_util::strings::toDouble | ( | const char * | from | ) |
Convert a string to a numeric value.
| [in] | from | String to convert. If the potentially convertible numeric value is not in range of the return type numeric limits, the conversion fails. |
| bool a_util::strings::toDouble | ( | const char * | from, |
| double & | to ) |
Safely convert a string to a numeric value.
| [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. |
| true | Conversion was successful, to contains the converted value. |
| false | Conversion failed, to is left untouched. |
| double a_util::strings::toDouble | ( | const std::string & | from | ) |
Convert a string to a numeric value.
| [in] | from | String to convert. If the potentially convertible numeric value is not in range of the return type numeric limits, the conversion fails. |
| bool a_util::strings::toDouble | ( | const std::string & | from, |
| double & | to ) |
Safely convert a string to a numeric value.
| [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. |
| true | Conversion was successful, to contains the converted value. |
| false | Conversion failed, to is left untouched. |
| float a_util::strings::toFloat | ( | const char * | from | ) |
Convert a string to a numeric value.
| [in] | from | String to convert. If the potentially convertible numeric value is not in range of the return type numeric limits, the conversion fails. |
| bool a_util::strings::toFloat | ( | const char * | from, |
| float & | to ) |
Safely convert a string to a numeric value.
| [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. |
| true | Conversion was successful, to contains the converted value. |
| false | Conversion failed, to is left untouched. |
| float a_util::strings::toFloat | ( | const std::string & | from | ) |
Convert a string to a numeric value.
| [in] | from | String to convert. If the potentially convertible numeric value is not in range of the return type numeric limits, the conversion fails. |
| bool a_util::strings::toFloat | ( | const std::string & | from, |
| float & | to ) |
Safely convert a string to a numeric value.
| [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. |
| true | Conversion was successful, to contains the converted value. |
| false | Conversion failed, to is left untouched. |
| std::int16_t a_util::strings::toInt16 | ( | const char * | from | ) |
Convert a string to a numeric value.
| [in] | from | String to convert. If the potentially convertible numeric value is not in range of the return type numeric limits, the conversion fails. |
| bool a_util::strings::toInt16 | ( | const char * | from, |
| std::int16_t & | to ) |
Safely convert a string to a numeric value.
| [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. |
| true | Conversion was successful, to contains the converted value. |
| false | Conversion failed, to is left untouched. |
| std::int16_t a_util::strings::toInt16 | ( | const std::string & | from | ) |
Convert a string to a numeric value.
| [in] | from | String to convert. If the potentially convertible numeric value is not in range of the return type numeric limits, the conversion fails. |
| bool a_util::strings::toInt16 | ( | const std::string & | from, |
| std::int16_t & | to ) |
Safely convert a string to a numeric value.
| [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. |
| true | Conversion was successful, to contains the converted value. |
| false | Conversion failed, to is left untouched. |
| std::int32_t a_util::strings::toInt32 | ( | const char * | from | ) |
Convert a string to a numeric value.
| [in] | from | String to convert. If the potentially convertible numeric value is not in range of the return type numeric limits, the conversion fails. |
| bool a_util::strings::toInt32 | ( | const char * | from, |
| std::int32_t & | to ) |
Safely convert a string to a numeric value.
| [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. |
| true | Conversion was successful, to contains the converted value. |
| false | Conversion failed, to is left untouched. |
| std::int32_t a_util::strings::toInt32 | ( | const std::string & | from | ) |
Convert a string to a numeric value.
| [in] | from | String to convert. If the potentially convertible numeric value is not in range of the return type numeric limits, the conversion fails. |
| bool a_util::strings::toInt32 | ( | const std::string & | from, |
| std::int32_t & | to ) |
Safely convert a string to a numeric value.
| [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. |
| true | Conversion was successful, to contains the converted value. |
| false | Conversion failed, to is left untouched. |
| std::int64_t a_util::strings::toInt64 | ( | const char * | from | ) |
Convert a string to a numeric value.
| [in] | from | String to convert. If the potentially convertible numeric value is not in range of the return type numeric limits, the conversion fails. |
| bool a_util::strings::toInt64 | ( | const char * | from, |
| std::int64_t & | to ) |
Safely convert a string to a numeric value.
| [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. |
| true | Conversion was successful, to contains the converted value. |
| false | Conversion failed, to is left untouched. |
| std::int64_t a_util::strings::toInt64 | ( | const std::string & | from | ) |
Convert a string to a numeric value.
| [in] | from | String to convert. If the potentially convertible numeric value is not in range of the return type numeric limits, the conversion fails. |
| bool a_util::strings::toInt64 | ( | const std::string & | from, |
| std::int64_t & | to ) |
Safely convert a string to a numeric value.
| [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. |
| true | Conversion was successful, to contains the converted value. |
| false | Conversion failed, to is left untouched. |
| std::int8_t a_util::strings::toInt8 | ( | const char * | from | ) |
Convert a string to a numeric value.
| [in] | from | String to convert. If the potentially convertible numeric value is not in range of the return type numeric limits, the conversion fails. |
| bool a_util::strings::toInt8 | ( | const char * | from, |
| std::int8_t & | to ) |
Safely convert a string to a numeric value.
| [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. |
| true | Conversion was successful, to contains the converted value. |
| false | Conversion failed, to is left untouched. |
| std::int8_t a_util::strings::toInt8 | ( | const std::string & | from | ) |
Convert a string to a numeric value.
| [in] | from | String to convert. If the potentially convertible numeric value is not in range of the return type numeric limits, the conversion fails. |
| bool a_util::strings::toInt8 | ( | const std::string & | from, |
| std::int8_t & | to ) |
Safely convert a string to a numeric value.
| [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. |
| true | Conversion was successful, to contains the converted value. |
| false | Conversion failed, to is left untouched. |
| Numeric a_util::strings::toNumeric | ( | const char * | from | ) |
Convert a string to a numeric value in a generic manner.
| Numeric | The numeric type the string gets converted to. |
| [in] | from | String to convert. If the potentially convertible numeric value is not in range of the return type numeric limits, the conversion fails. |
| bool a_util::strings::toNumeric | ( | const char * | from, |
| Numeric & | to ) |
Safely convert a string to a value of type Numeric in a generic manner.
| Numeric | The numeric type the string gets converted to. |
| [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. |
| true | Conversion was successful, to contains the converted value. |
| false | Conversion failed, to is left untouched. |
| Numeric a_util::strings::toNumeric | ( | const std::string & | from | ) |
Convert a string to a numeric value in a generic manner.
| Numeric | The numeric type the string gets converted to. |
| [in] | from | String to convert. If the potentially convertible numeric value is not in range of the return type numeric limits, the conversion fails. |
| bool a_util::strings::toNumeric | ( | const std::string & | from, |
| Numeric & | to ) |
Safely convert a string to a value of type Numeric in a generic manner.
| Numeric | The numeric type the string gets converted to. |
| [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. |
| true | Conversion was successful, to contains the converted value. |
| false | Conversion failed, to is left untouched. |
| std::string a_util::strings::toString | ( | bool | from | ) |
Convert the boolean value to its string representation
| [in] | from | The value converted to its string representation. |
| std::string a_util::strings::toString | ( | double | from | ) |
Convert the given value to a standard string.
| [in] | from | The value converted to its string representation. |
| std::string a_util::strings::toString | ( | float | from | ) |
Convert the given value to a standard string.
| [in] | from | The value converted to its string representation. |
| std::string a_util::strings::toString | ( | std::int16_t | from | ) |
Convert the given value to a standard string.
| [in] | from | The value converted to its string representation. |
| std::string a_util::strings::toString | ( | std::int32_t | from | ) |
Convert the given value to a standard string.
| [in] | from | The value converted to its string representation. |
| std::string a_util::strings::toString | ( | std::int64_t | from | ) |
Convert the given value to a standard string.
| [in] | from | The value converted to its string representation. |
| std::string a_util::strings::toString | ( | std::int8_t | from | ) |
Convert the given value to a standard string.
| [in] | from | The value converted to its string representation. |
| std::string a_util::strings::toString | ( | std::uint16_t | from | ) |
Convert the given value to a standard string.
| [in] | from | The value converted to its string representation. |
| std::string a_util::strings::toString | ( | std::uint32_t | from | ) |
Convert the given value to a standard string.
| [in] | from | The value converted to its string representation. |
| std::string a_util::strings::toString | ( | std::uint64_t | from | ) |
Convert the given value to a standard string.
| [in] | from | The value converted to its string representation. |
| std::string a_util::strings::toString | ( | std::uint8_t | from | ) |
Convert the given value to a standard string.
| [in] | from | The value converted to its string representation. |
| std::uint16_t a_util::strings::toUInt16 | ( | const char * | from | ) |
Convert a string to a numeric value.
| [in] | from | String to convert. If the potentially convertible numeric value is not in range of the return type numeric limits, the conversion fails. |
| bool a_util::strings::toUInt16 | ( | const char * | from, |
| std::uint16_t & | to ) |
Safely convert a string to a numeric value.
| [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. |
| true | Conversion was successful, to contains the converted value. |
| false | Conversion failed, to is left untouched. |
| std::uint16_t a_util::strings::toUInt16 | ( | const std::string & | from | ) |
Convert a string to a numeric value.
| [in] | from | String to convert. If the potentially convertible numeric value is not in range of the return type numeric limits, the conversion fails. |
| bool a_util::strings::toUInt16 | ( | const std::string & | from, |
| std::uint16_t & | to ) |
Safely convert a string to a numeric value.
| [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. |
| true | Conversion was successful, to contains the converted value. |
| false | Conversion failed, to is left untouched. |
| std::uint32_t a_util::strings::toUInt32 | ( | const char * | from | ) |
Convert a string to a numeric value.
| [in] | from | String to convert. If the potentially convertible numeric value is not in range of the return type numeric limits, the conversion fails. |
| bool a_util::strings::toUInt32 | ( | const char * | from, |
| std::uint32_t & | to ) |
Safely convert a string to a numeric value.
| [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. |
| true | Conversion was successful, to contains the converted value. |
| false | Conversion failed, to is left untouched. |
| std::uint32_t a_util::strings::toUInt32 | ( | const std::string & | from | ) |
Convert a string to a numeric value.
| [in] | from | String to convert. If the potentially convertible numeric value is not in range of the return type numeric limits, the conversion fails. |
| bool a_util::strings::toUInt32 | ( | const std::string & | from, |
| std::uint32_t & | to ) |
Safely convert a string to a numeric value.
| [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. |
| true | Conversion was successful, to contains the converted value. |
| false | Conversion failed, to is left untouched. |
| std::uint64_t a_util::strings::toUInt64 | ( | const char * | from | ) |
Convert a string to a numeric value.
| [in] | from | String to convert. If the potentially convertible numeric value is not in range of the return type numeric limits, the conversion fails. |
| bool a_util::strings::toUInt64 | ( | const char * | from, |
| std::uint64_t & | to ) |
Safely convert a string to a numeric value.
| [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. |
| true | Conversion was successful, to contains the converted value. |
| false | Conversion failed, to is left untouched. |
| std::uint64_t a_util::strings::toUInt64 | ( | const std::string & | from | ) |
Convert a string to a numeric value.
| [in] | from | String to convert. If the potentially convertible numeric value is not in range of the return type numeric limits, the conversion fails. |
| bool a_util::strings::toUInt64 | ( | const std::string & | from, |
| std::uint64_t & | to ) |
Safely convert a string to a numeric value.
| [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. |
| true | Conversion was successful, to contains the converted value. |
| false | Conversion failed, to is left untouched. |
| std::uint8_t a_util::strings::toUInt8 | ( | const char * | from | ) |
Convert a string to a numeric value.
| [in] | from | String to convert. If the potentially convertible numeric value is not in range of the return type numeric limits, the conversion fails. |
| bool a_util::strings::toUInt8 | ( | const char * | from, |
| std::uint8_t & | to ) |
Safely convert a string to a numeric value.
| [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. |
| true | Conversion was successful, to contains the converted value. |
| false | Conversion failed, to is left untouched. |
| std::uint8_t a_util::strings::toUInt8 | ( | const std::string & | from | ) |
Convert a string to a numeric value.
| [in] | from | String to convert. If the potentially convertible numeric value is not in range of the return type numeric limits, the conversion fails. |
| bool a_util::strings::toUInt8 | ( | const std::string & | from, |
| std::uint8_t & | to ) |
Safely convert a string to a numeric value.
| [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. |
| true | Conversion was successful, to contains the converted value. |
| false | Conversion failed, to is left untouched. |
| std::string & a_util::strings::trim | ( | std::string & | str | ) |
Trims all whitespace characters from the start and end of a string
| str | [inout] The string that is trimmed |
| std::string & a_util::strings::trim | ( | std::string & | str, |
| const std::string & | trimmed_chars ) |
Trims a specified set of characters from the start and end of a string
| str | [inout] The string that is trimmed |
| trimmed_chars | [in] The set of characters to trim |