Classes | Functions
FromString.hpp File Reference

(4)

Pre-defined universal from-string functions. More...

#include <Balau/Type/Impl/FromStringImpl.hpp>
#include <Balau/Util/Strings.hpp>
Include dependency graph for FromString.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  FromString< typename >
 Template class based from-string function for use in template classes. More...
 
struct  FromString< char >
 UTF-8 specialisation of FromString<T>. More...
 
struct  FromString< char16_t >
 UTF-16 specialisation of FromString<T>. More...
 
struct  FromString< char32_t >
 UTF-32 specialisation of FromString<T>. More...
 

Functions

void fromString (std::string &destination, std::string_view value)
 Sets the destination value to the supplied value. More...
 
void fromString (std::u16string &destination, std::string_view value)
 Sets the destination value to a UTF-16 version of the supplied UTF-8 string. More...
 
void fromString (std::u32string &destination, std::string_view value)
 Sets the destination value to a UTF-32 version of the supplied UTF-8 string. More...
 
void fromString (char &destination, std::string_view value)
 Sets the destination value to the first UTF-8 character in the supplied UTF-8 string. More...
 
void fromString (char32_t &destination, std::string_view value)
 Sets the destination value to the first code point in the supplied UTF-8 string. More...
 
void fromString (signed char &destination, std::string_view value)
 Converts the supplied string to a signed char value. More...
 
void fromString (signed char &destination, std::string_view value, int base)
 Converts the supplied string to a signed char value, using the specified numeric base. More...
 
void fromString (short &destination, std::string_view value)
 Converts the supplied string to a signed short value. More...
 
void fromString (short &destination, std::string_view value, int base)
 Converts the supplied string to a signed short value, using the specified numeric base. More...
 
void fromString (int &destination, std::string_view value)
 Converts the supplied string to a signed int value. More...
 
void fromString (int &destination, std::string_view value, int base)
 Converts the supplied string to a signed int value, using the specified numeric base. More...
 
void fromString (long &destination, std::string_view value)
 Converts the supplied string to a signed long value. More...
 
void fromString (long &destination, std::string_view value, int base)
 Converts the supplied string to a signed long value, using the specified numeric base. More...
 
void fromString (long long &destination, std::string_view value)
 Converts the supplied string to a signed long long value. More...
 
void fromString (long long &destination, std::string_view value, int base)
 Converts the supplied string to a signed long long value, using the specified numeric base. More...
 
void fromString (unsigned char &destination, std::string_view value)
 Converts the supplied string to a unsigned char value. More...
 
void fromString (unsigned char &destination, std::string_view value, int base)
 Converts the supplied string to a unsigned char value, using the specified numeric base. More...
 
void fromString (unsigned short &destination, std::string_view value)
 Converts the supplied string to a unsigned short value. More...
 
void fromString (unsigned short &destination, std::string_view value, int base)
 Converts the supplied string to a unsigned short value, using the specified numeric base. More...
 
void fromString (unsigned int &destination, std::string_view value)
 Converts the supplied string to a unsigned int value. More...
 
void fromString (unsigned int &destination, std::string_view value, int base)
 Converts the supplied string to a unsigned int value, using the specified numeric base. More...
 
void fromString (unsigned long &destination, std::string_view value)
 Converts the supplied string to a unsigned long value. More...
 
void fromString (unsigned long &destination, std::string_view value, int base)
 Converts the supplied string to a unsigned long value, using the specified numeric base. More...
 
void fromString (unsigned long long &destination, std::string_view value)
 Converts the supplied string to a unsigned long long value. More...
 
void fromString (unsigned long long &destination, std::string_view value, int base)
 Converts the supplied string to a unsigned long long value, using the specified numeric base. More...
 
void fromString (float &destination, std::string_view value)
 Converts the supplied string to a single precision floating point value. More...
 
void fromString (double &destination, std::string_view value)
 Converts the supplied string to a double precision floating point value. More...
 
void fromString (long double &destination, std::string_view value)
 Converts the supplied string to a long double precision floating point value. More...
 
void fromString (bool &destination, std::string_view value)
 Converts the supplied string to a boolean value. More...
 
void fromString16 (std::string &destination, std::u16string_view value)
 Sets the destination value to a UTF-8 version of the supplied UTF-16 string. More...
 
void fromString16 (std::u16string &destination, std::u16string_view value)
 Sets the destination value to the supplied value. More...
 
void fromString16 (std::u32string &destination, std::u16string_view value)
 Sets the destination value to a UTF-32 version of the supplied UTF-16 string. More...
 
void fromString16 (char &destination, std::u16string_view value)
 Sets the destination value to the first character in the supplied UTF-16 string. More...
 
void fromString16 (char32_t &destination, std::u16string_view value)
 Sets the destination value to the first code point in the supplied UTF-16 string. More...
 
void fromString16 (signed char &destination, std::u16string_view value)
 Converts the supplied string to a signed char value. More...
 
void fromString16 (short &destination, std::u16string_view value)
 Converts the supplied string to a signed short value. More...
 
void fromString16 (int &destination, std::u16string_view value)
 Converts the supplied string to a signed int value. More...
 
void fromString16 (long &destination, std::u16string_view value)
 Converts the supplied string to a signed long value. More...
 
void fromString16 (long long &destination, std::u16string_view value)
 Converts the supplied string to a signed long long value. More...
 
void fromString16 (unsigned char &destination, std::u16string_view value)
 Converts the supplied string to a unsigned char value. More...
 
void fromString16 (unsigned short &destination, std::u16string_view value)
 Converts the supplied string to a unsigned short value. More...
 
void fromString16 (unsigned int &destination, std::u16string_view value)
 Converts the supplied string to a unsigned int value. More...
 
void fromString16 (unsigned long &destination, std::u16string_view value)
 Converts the supplied string to a unsigned long value. More...
 
void fromString16 (unsigned long long &destination, std::u16string_view value)
 Converts the supplied string to a unsigned long long value. More...
 
void fromString16 (float &destination, std::u16string_view value)
 Sets the destination value to Convert the supplied float to a UTF-16 string. More...
 
void fromString16 (double &destination, std::u16string_view value)
 Sets the destination value to Convert the supplied double to a UTF-16 string. More...
 
void fromString16 (long double &destination, std::u16string_view value)
 Sets the destination value to Convert the supplied long double to a UTF-16 string. More...
 
void fromString16 (bool &destination, std::u16string_view value)
 Converts the supplied string to a boolean value. More...
 
void fromString32 (std::string &destination, std::u32string_view value)
 Sets the destination value to a UTF-8 version of the supplied UTF-32 string. More...
 
void fromString32 (std::u16string &destination, std::u32string_view value)
 Sets the destination value to a UTF-16 version of the supplied UTF-32 string. More...
 
void fromString32 (std::u32string &destination, std::u32string_view value)
 Sets the destination value to the supplied value. More...
 
void fromString32 (char &destination, std::u32string_view value)
 Sets the destination value to the first character in the supplied UTF-32 string. More...
 
void fromString32 (char32_t &destination, std::u32string_view value)
 Sets the destination value to the first code point in the supplied UTF-32 string. More...
 
void fromString32 (signed char &destination, std::u32string_view value)
 Converts the supplied string to a signed char value. More...
 
void fromString32 (short &destination, std::u32string_view value)
 Converts the supplied string to a signed short value. More...
 
void fromString32 (int &destination, std::u32string_view value)
 Converts the supplied string to a signed int value. More...
 
void fromString32 (long &destination, std::u32string_view value)
 Converts the supplied string to a signed long value. More...
 
void fromString32 (long long &destination, std::u32string_view value)
 Converts the supplied string to a signed long long value. More...
 
void fromString32 (unsigned char &destination, std::u32string_view value)
 Converts the supplied string to a unsigned char value. More...
 
void fromString32 (unsigned short &destination, std::u32string_view value)
 Converts the supplied string to a unsigned short value. More...
 
void fromString32 (unsigned int &destination, std::u32string_view value)
 Converts the supplied string to a unsigned int value. More...
 
void fromString32 (unsigned long &destination, std::u32string_view value)
 Converts the supplied string to a unsigned long value. More...
 
void fromString32 (unsigned long long &destination, std::u32string_view value)
 Converts the supplied string to a unsigned long long value. More...
 
void fromString32 (float &destination, std::u32string_view value)
 Sets the destination value to Convert the supplied float to a UTF-32 string. More...
 
void fromString32 (double &destination, std::u32string_view value)
 Sets the destination value to Convert the supplied double to a UTF-32 string. More...
 
void fromString32 (long double &destination, std::u32string_view value)
 Sets the destination value to Convert the supplied long double to a UTF-32 string. More...
 
void fromString32 (bool &destination, std::u32string_view value)
 Converts the supplied string to a boolean value. More...
 

Detailed Description

Pre-defined universal from-string functions.


Class Documentation

◆ FromString

struct FromString

template<typename>
struct FromString< typename >

Template class based from-string function for use in template classes.

Function Documentation

◆ fromString() [1/29]

void fromString ( std::string &  destination,
std::string_view  value 
)
inline

Sets the destination value to the supplied value.

Parameters
destinationthe destination value that is set via assignment
valuethe string view input

◆ fromString() [2/29]

void fromString ( std::u16string &  destination,
std::string_view  value 
)
inline

Sets the destination value to a UTF-16 version of the supplied UTF-8 string.

Parameters
destinationthe destination value that is set via assignment
valuethe string view input

◆ fromString() [3/29]

void fromString ( std::u32string &  destination,
std::string_view  value 
)
inline

Sets the destination value to a UTF-32 version of the supplied UTF-8 string.

Parameters
destinationthe destination value that is set via assignment
valuethe string view input

◆ fromString() [4/29]

void fromString ( char &  destination,
std::string_view  value 
)
inline

Sets the destination value to the first UTF-8 character in the supplied UTF-8 string.

A ConversionException will be thrown under the following circumstances:

  • the string is empty;
  • the string contains invalid UTF-8 text;
  • the code point does not fit in an ascii char.
Parameters
destinationthe destination value that is set via assignment
valuethe string view input
Exceptions
ConversionExceptionwhen the conversion fails

◆ fromString() [5/29]

void fromString ( char32_t &  destination,
std::string_view  value 
)
inline

Sets the destination value to the first code point in the supplied UTF-8 string.

A ConversionException will be thrown under the following circumstances:

  • the string is empty;
  • the string contains invalid UTF-8 text.
Parameters
destinationthe destination value that is set via assignment
valuethe string view input
Exceptions
ConversionExceptionwhen the conversion fails

◆ fromString() [6/29]

void fromString ( signed char &  destination,
std::string_view  value 
)
inline

Converts the supplied string to a signed char value.

A ConversionException will be thrown under the following circumstances:

  • the string is empty;
  • the string to number conversion fails;
  • the resulting numeric value is out of the valid range for the numeric type.
Parameters
destinationthe destination value that is set via assignment
valuethe string view input
Exceptions
ConversionExceptionwhen the conversion fails

◆ fromString() [7/29]

void fromString ( signed char &  destination,
std::string_view  value,
int  base 
)
inline

Converts the supplied string to a signed char value, using the specified numeric base.

A ConversionException will be thrown under the following circumstances:

  • the string is empty;
  • the string to number conversion fails;
  • the resulting numeric value is out of the valid range for the numeric type.
Parameters
destinationthe destination value that is set via assignment
valuethe string view input
basethe base of the unsigned short in the supplied string view
Exceptions
ConversionExceptionwhen the conversion fails

◆ fromString() [8/29]

void fromString ( short &  destination,
std::string_view  value 
)
inline

Converts the supplied string to a signed short value.

A ConversionException will be thrown under the following circumstances:

  • the string is empty;
  • the string to number conversion fails;
  • the resulting numeric value is out of the valid range for the numeric type.
Parameters
destinationthe destination value that is set via assignment
valuethe string view input
Exceptions
ConversionExceptionwhen the conversion fails

◆ fromString() [9/29]

void fromString ( short &  destination,
std::string_view  value,
int  base 
)
inline

Converts the supplied string to a signed short value, using the specified numeric base.

A ConversionException will be thrown under the following circumstances:

  • the string is empty;
  • the string to number conversion fails;
  • the resulting numeric value is out of the valid range for the numeric type.
Parameters
destinationthe destination value that is set via assignment
valuethe string view input
basethe base of the unsigned short in the supplied string view
Exceptions
ConversionExceptionwhen the conversion fails

◆ fromString() [10/29]

void fromString ( int &  destination,
std::string_view  value 
)
inline

Converts the supplied string to a signed int value.

A ConversionException will be thrown under the following circumstances:

  • the string is empty;
  • the string to number conversion fails;
  • the resulting numeric value is out of the valid range for the numeric type.
Parameters
destinationthe destination value that is set via assignment
valuethe string view input
Exceptions
ConversionExceptionwhen the conversion fails

◆ fromString() [11/29]

void fromString ( int &  destination,
std::string_view  value,
int  base 
)
inline

Converts the supplied string to a signed int value, using the specified numeric base.

A ConversionException will be thrown under the following circumstances:

  • the string is empty;
  • the string to number conversion fails;
  • the resulting numeric value is out of the valid range for the numeric type.
Parameters
destinationthe destination value that is set via assignment
valuethe string view input
basethe base of the unsigned short in the supplied string view
Exceptions
ConversionExceptionwhen the conversion fails

◆ fromString() [12/29]

void fromString ( long &  destination,
std::string_view  value 
)
inline

Converts the supplied string to a signed long value.

A ConversionException will be thrown under the following circumstances:

  • the string is empty;
  • the string to number conversion fails;
  • the resulting numeric value is out of the valid range for the numeric type.
Parameters
destinationthe destination value that is set via assignment
valuethe string view input
Exceptions
ConversionExceptionwhen the conversion fails

◆ fromString() [13/29]

void fromString ( long &  destination,
std::string_view  value,
int  base 
)
inline

Converts the supplied string to a signed long value, using the specified numeric base.

A ConversionException will be thrown under the following circumstances:

  • the string is empty;
  • the string to number conversion fails;
  • the resulting numeric value is out of the valid range for the numeric type.
Parameters
destinationthe destination value that is set via assignment
valuethe string view input
basethe base of the unsigned short in the supplied string view
Exceptions
ConversionExceptionwhen the conversion fails

◆ fromString() [14/29]

void fromString ( long long &  destination,
std::string_view  value 
)
inline

Converts the supplied string to a signed long long value.

A ConversionException will be thrown under the following circumstances:

  • the string is empty;
  • the string to number conversion fails;
  • the resulting numeric value is out of the valid range for the numeric type.
Parameters
destinationthe destination value that is set via assignment
valuethe string view input
Exceptions
ConversionExceptionwhen the conversion fails

◆ fromString() [15/29]

void fromString ( long long &  destination,
std::string_view  value,
int  base 
)
inline

Converts the supplied string to a signed long long value, using the specified numeric base.

A ConversionException will be thrown under the following circumstances:

  • the string is empty;
  • the string to number conversion fails;
  • the resulting numeric value is out of the valid range for the numeric type.
Parameters
destinationthe destination value that is set via assignment
valuethe string view input
basethe base of the unsigned short in the supplied string view
Exceptions
ConversionExceptionwhen the conversion fails

◆ fromString() [16/29]

void fromString ( unsigned char &  destination,
std::string_view  value 
)
inline

Converts the supplied string to a unsigned char value.

A ConversionException will be thrown under the following circumstances:

  • the string is empty;
  • the string to number conversion fails;
  • the resulting numeric value is out of the valid range for the numeric type.
Parameters
destinationthe destination value that is set via assignment
valuethe string view input
Exceptions
ConversionExceptionwhen the conversion fails

◆ fromString() [17/29]

void fromString ( unsigned char &  destination,
std::string_view  value,
int  base 
)
inline

Converts the supplied string to a unsigned char value, using the specified numeric base.

A ConversionException will be thrown under the following circumstances:

  • the string is empty;
  • the string to number conversion fails;
  • the resulting numeric value is out of the valid range for the numeric type.
Parameters
destinationthe destination value that is set via assignment
valuethe string view input
basethe base of the unsigned short in the supplied string view
Exceptions
ConversionExceptionwhen the conversion fails

◆ fromString() [18/29]

void fromString ( unsigned short &  destination,
std::string_view  value 
)
inline

Converts the supplied string to a unsigned short value.

A ConversionException will be thrown under the following circumstances:

  • the string is empty;
  • the string to number conversion fails;
  • the resulting numeric value is out of the valid range for the numeric type.
Parameters
destinationthe destination value that is set via assignment
valuethe string view input
Exceptions
ConversionExceptionwhen the conversion fails

◆ fromString() [19/29]

void fromString ( unsigned short &  destination,
std::string_view  value,
int  base 
)
inline

Converts the supplied string to a unsigned short value, using the specified numeric base.

A ConversionException will be thrown under the following circumstances:

  • the string is empty;
  • the string to number conversion fails;
  • the resulting numeric value is out of the valid range for the numeric type.
Parameters
destinationthe destination value that is set via assignment
valuethe string view input
basethe base of the unsigned short in the supplied string view
Exceptions
ConversionExceptionwhen the conversion fails

◆ fromString() [20/29]

void fromString ( unsigned int &  destination,
std::string_view  value 
)
inline

Converts the supplied string to a unsigned int value.

A ConversionException will be thrown under the following circumstances:

  • the string is empty;
  • the string to number conversion fails;
  • the resulting numeric value is out of the valid range for the numeric type.
Parameters
destinationthe destination value that is set via assignment
valuethe string view input
Exceptions
ConversionExceptionwhen the conversion fails

◆ fromString() [21/29]

void fromString ( unsigned int &  destination,
std::string_view  value,
int  base 
)
inline

Converts the supplied string to a unsigned int value, using the specified numeric base.

A ConversionException will be thrown under the following circumstances:

  • the string is empty;
  • the string to number conversion fails;
  • the resulting numeric value is out of the valid range for the numeric type.
Parameters
destinationthe destination value that is set via assignment
valuethe string view input
basethe base of the unsigned short in the supplied string view
Exceptions
ConversionExceptionwhen the conversion fails

◆ fromString() [22/29]

void fromString ( unsigned long &  destination,
std::string_view  value 
)
inline

Converts the supplied string to a unsigned long value.

A ConversionException will be thrown under the following circumstances:

  • the string is empty;
  • the string to number conversion fails;
  • the resulting numeric value is out of the valid range for the numeric type.
Parameters
destinationthe destination value that is set via assignment
valuethe string view input
Exceptions
ConversionExceptionwhen the conversion fails

◆ fromString() [23/29]

void fromString ( unsigned long &  destination,
std::string_view  value,
int  base 
)
inline

Converts the supplied string to a unsigned long value, using the specified numeric base.

A ConversionException will be thrown under the following circumstances:

  • the string is empty;
  • the string to number conversion fails;
  • the resulting numeric value is out of the valid range for the numeric type.
Parameters
destinationthe destination value that is set via assignment
valuethe string view input
basethe base of the unsigned short in the supplied string view
Exceptions
ConversionExceptionwhen the conversion fails

◆ fromString() [24/29]

void fromString ( unsigned long long &  destination,
std::string_view  value 
)
inline

Converts the supplied string to a unsigned long long value.

A ConversionException will be thrown under the following circumstances:

  • the string is empty;
  • the string to number conversion fails;
  • the resulting numeric value is out of the valid range for the numeric type.
Parameters
destinationthe destination value that is set via assignment
valuethe string view input
Exceptions
ConversionExceptionwhen the conversion fails

◆ fromString() [25/29]

void fromString ( unsigned long long &  destination,
std::string_view  value,
int  base 
)
inline

Converts the supplied string to a unsigned long long value, using the specified numeric base.

A ConversionException will be thrown under the following circumstances:

  • the string is empty;
  • the string to number conversion fails;
  • the resulting numeric value is out of the valid range for the numeric type.
Parameters
destinationthe destination value that is set via assignment
valuethe string view input
basethe base of the unsigned short in the supplied string view
Exceptions
ConversionExceptionwhen the conversion fails

◆ fromString() [26/29]

void fromString ( float &  destination,
std::string_view  value 
)
inline

Converts the supplied string to a single precision floating point value.

A ConversionException will be thrown under the following circumstances:

  • the string is empty;
  • the string to number conversion fails;
  • the resulting numeric value is out of the valid range for the numeric type.
Parameters
destinationthe destination value that is set via assignment
valuethe string view input
Exceptions
ConversionExceptionwhen the conversion fails

◆ fromString() [27/29]

void fromString ( double &  destination,
std::string_view  value 
)
inline

Converts the supplied string to a double precision floating point value.

A ConversionException will be thrown under the following circumstances:

  • the string is empty;
  • the string to number conversion fails;
  • the resulting numeric value is out of the valid range for the numeric type.
Parameters
destinationthe destination value that is set via assignment
valuethe string view input
Exceptions
ConversionExceptionwhen the conversion fails

◆ fromString() [28/29]

void fromString ( long double &  destination,
std::string_view  value 
)
inline

Converts the supplied string to a long double precision floating point value.

A ConversionException will be thrown under the following circumstances:

  • the string is empty;
  • the string to number conversion fails;
  • the resulting numeric value is out of the valid range for the numeric type.
Parameters
destinationthe destination value that is set via assignment
valuethe string view input
Exceptions
ConversionExceptionwhen the conversion fails

◆ fromString() [29/29]

void fromString ( bool &  destination,
std::string_view  value 
)
inline

Converts the supplied string to a boolean value.

A ConversionException will be thrown under the following circumstances:

  • the string does not contain one of the case insensitive strings "false" or "true".
Parameters
destinationthe destination value that is set via assignment
valuethe string view input
Exceptions
ConversionExceptionwhen the conversion fails

◆ fromString16() [1/19]

void fromString16 ( std::string &  destination,
std::u16string_view  value 
)
inline

Sets the destination value to a UTF-8 version of the supplied UTF-16 string.

Parameters
destinationthe destination value that is set via assignment
valuethe string view input

◆ fromString16() [2/19]

void fromString16 ( std::u16string &  destination,
std::u16string_view  value 
)
inline

Sets the destination value to the supplied value.

Parameters
destinationthe destination value that is set via assignment
valuethe string view input

◆ fromString16() [3/19]

void fromString16 ( std::u32string &  destination,
std::u16string_view  value 
)
inline

Sets the destination value to a UTF-32 version of the supplied UTF-16 string.

Parameters
destinationthe destination value that is set via assignment
valuethe string view input

◆ fromString16() [4/19]

void fromString16 ( char &  destination,
std::u16string_view  value 
)
inline

Sets the destination value to the first character in the supplied UTF-16 string.

A ConversionException will be thrown under the following circumstances:

  • the string is empty;
  • the code point does not fit in an ascii char.
Parameters
destinationthe destination value that is set via assignment
valuethe string view input
Exceptions
ConversionExceptionwhen the conversion fails

◆ fromString16() [5/19]

void fromString16 ( char32_t &  destination,
std::u16string_view  value 
)
inline

Sets the destination value to the first code point in the supplied UTF-16 string.

A ConversionException will be thrown under the following circumstances:

  • the string is empty.
Parameters
destinationthe destination value that is set via assignment
valuethe string view input
Exceptions
ConversionExceptionwhen the conversion fails

◆ fromString16() [6/19]

void fromString16 ( signed char &  destination,
std::u16string_view  value 
)
inline

Converts the supplied string to a signed char value.

A ConversionException will be thrown under the following circumstances:

  • the string is empty;
  • the string to number conversion fails;
  • the resulting numeric value is out of the valid range for the numeric type.
Parameters
destinationthe destination value that is set via assignment
valuethe string view input
Exceptions
ConversionExceptionwhen the conversion fails

◆ fromString16() [7/19]

void fromString16 ( short &  destination,
std::u16string_view  value 
)
inline

Converts the supplied string to a signed short value.

A ConversionException will be thrown under the following circumstances:

  • the string is empty;
  • the string to number conversion fails;
  • the resulting numeric value is out of the valid range for the numeric type.
Parameters
destinationthe destination value that is set via assignment
valuethe string view input
Exceptions
ConversionExceptionwhen the conversion fails

◆ fromString16() [8/19]

void fromString16 ( int &  destination,
std::u16string_view  value 
)
inline

Converts the supplied string to a signed int value.

A ConversionException will be thrown under the following circumstances:

  • the string is empty;
  • the string to number conversion fails;
  • the resulting numeric value is out of the valid range for the numeric type.
Parameters
destinationthe destination value that is set via assignment
valuethe string view input
Exceptions
ConversionExceptionwhen the conversion fails

◆ fromString16() [9/19]

void fromString16 ( long &  destination,
std::u16string_view  value 
)
inline

Converts the supplied string to a signed long value.

A ConversionException will be thrown under the following circumstances:

  • the string is empty;
  • the string to number conversion fails;
  • the resulting numeric value is out of the valid range for the numeric type.
Parameters
destinationthe destination value that is set via assignment
valuethe string view input
Exceptions
ConversionExceptionwhen the conversion fails

◆ fromString16() [10/19]

void fromString16 ( long long &  destination,
std::u16string_view  value 
)
inline

Converts the supplied string to a signed long long value.

A ConversionException will be thrown under the following circumstances:

  • the string is empty;
  • the string to number conversion fails;
  • the resulting numeric value is out of the valid range for the numeric type.
Parameters
destinationthe destination value that is set via assignment
valuethe string view input
Exceptions
ConversionExceptionwhen the conversion fails

◆ fromString16() [11/19]

void fromString16 ( unsigned char &  destination,
std::u16string_view  value 
)
inline

Converts the supplied string to a unsigned char value.

A ConversionException will be thrown under the following circumstances:

  • the string is empty;
  • the string to number conversion fails;
  • the resulting numeric value is out of the valid range for the numeric type.
Parameters
destinationthe destination value that is set via assignment
valuethe string view input
Exceptions
ConversionExceptionwhen the conversion fails

◆ fromString16() [12/19]

void fromString16 ( unsigned short &  destination,
std::u16string_view  value 
)
inline

Converts the supplied string to a unsigned short value.

A ConversionException will be thrown under the following circumstances:

  • the string is empty;
  • the string to number conversion fails;
  • the resulting numeric value is out of the valid range for the numeric type.
Parameters
destinationthe destination value that is set via assignment
valuethe string view input
Exceptions
ConversionExceptionwhen the conversion fails

◆ fromString16() [13/19]

void fromString16 ( unsigned int &  destination,
std::u16string_view  value 
)
inline

Converts the supplied string to a unsigned int value.

A ConversionException will be thrown under the following circumstances:

  • the string is empty;
  • the string to number conversion fails;
  • the resulting numeric value is out of the valid range for the numeric type.
Parameters
destinationthe destination value that is set via assignment
valuethe string view input
Exceptions
ConversionExceptionwhen the conversion fails

◆ fromString16() [14/19]

void fromString16 ( unsigned long &  destination,
std::u16string_view  value 
)
inline

Converts the supplied string to a unsigned long value.

A ConversionException will be thrown under the following circumstances:

  • the string is empty;
  • the string to number conversion fails;
  • the resulting numeric value is out of the valid range for the numeric type.
Parameters
destinationthe destination value that is set via assignment
valuethe string view input
Exceptions
ConversionExceptionwhen the conversion fails

◆ fromString16() [15/19]

void fromString16 ( unsigned long long &  destination,
std::u16string_view  value 
)
inline

Converts the supplied string to a unsigned long long value.

A ConversionException will be thrown under the following circumstances:

  • the string is empty;
  • the string to number conversion fails;
  • the resulting numeric value is out of the valid range for the numeric type.
Parameters
destinationthe destination value that is set via assignment
valuethe string view input
Exceptions
ConversionExceptionwhen the conversion fails

◆ fromString16() [16/19]

void fromString16 ( float &  destination,
std::u16string_view  value 
)
inline

Sets the destination value to Convert the supplied float to a UTF-16 string.

A ConversionException will be thrown under the following circumstances:

  • the string is empty;
  • the string to number conversion fails;
  • the resulting numeric value is out of the valid range for the numeric type.
Parameters
destinationthe destination value that is set via assignment
valuethe string view input
Exceptions
ConversionExceptionwhen the conversion fails

◆ fromString16() [17/19]

void fromString16 ( double &  destination,
std::u16string_view  value 
)
inline

Sets the destination value to Convert the supplied double to a UTF-16 string.

A ConversionException will be thrown under the following circumstances:

  • the string is empty;
  • the string to number conversion fails;
  • the resulting numeric value is out of the valid range for the numeric type.
Parameters
destinationthe destination value that is set via assignment
valuethe string view input
Exceptions
ConversionExceptionwhen the conversion fails

◆ fromString16() [18/19]

void fromString16 ( long double &  destination,
std::u16string_view  value 
)
inline

Sets the destination value to Convert the supplied long double to a UTF-16 string.

A ConversionException will be thrown under the following circumstances:

  • the string is empty;
  • the string to number conversion fails;
  • the resulting numeric value is out of the valid range for the numeric type.
Parameters
destinationthe destination value that is set via assignment
valuethe string view input
Exceptions
ConversionExceptionwhen the conversion fails

◆ fromString16() [19/19]

void fromString16 ( bool &  destination,
std::u16string_view  value 
)
inline

Converts the supplied string to a boolean value.

A ConversionException will be thrown under the following circumstances:

  • the string does not contain one of the case insensitive strings "false" or "true".
Parameters
destinationthe destination value that is set via assignment
valuethe string view input
Exceptions
ConversionExceptionwhen the conversion fails

◆ fromString32() [1/19]

void fromString32 ( std::string &  destination,
std::u32string_view  value 
)
inline

Sets the destination value to a UTF-8 version of the supplied UTF-32 string.

Parameters
destinationthe destination value that is set via assignment
valuethe string view input

◆ fromString32() [2/19]

void fromString32 ( std::u16string &  destination,
std::u32string_view  value 
)
inline

Sets the destination value to a UTF-16 version of the supplied UTF-32 string.

Parameters
destinationthe destination value that is set via assignment
valuethe string view input

◆ fromString32() [3/19]

void fromString32 ( std::u32string &  destination,
std::u32string_view  value 
)
inline

Sets the destination value to the supplied value.

Parameters
destinationthe destination value that is set via assignment
valuethe string view input

◆ fromString32() [4/19]

void fromString32 ( char &  destination,
std::u32string_view  value 
)
inline

Sets the destination value to the first character in the supplied UTF-32 string.

A ConversionException will be thrown under the following circumstances:

  • the string is empty;
  • the code point does not fit in an ascii char.
Parameters
destinationthe destination value that is set via assignment
valuethe string view input
Exceptions
ConversionExceptionwhen the conversion fails

◆ fromString32() [5/19]

void fromString32 ( char32_t &  destination,
std::u32string_view  value 
)
inline

Sets the destination value to the first code point in the supplied UTF-32 string.

A ConversionException will be thrown under the following circumstances:

  • the string is empty.
Parameters
destinationthe destination value that is set via assignment
valuethe string view input
Exceptions
ConversionExceptionwhen the conversion fails

◆ fromString32() [6/19]

void fromString32 ( signed char &  destination,
std::u32string_view  value 
)
inline

Converts the supplied string to a signed char value.

A ConversionException will be thrown under the following circumstances:

  • the string is empty;
  • the string to number conversion fails;
  • the resulting numeric value is out of the valid range for the numeric type.
Parameters
destinationthe destination value that is set via assignment
valuethe string view input
Exceptions
ConversionExceptionwhen the conversion fails

◆ fromString32() [7/19]

void fromString32 ( short &  destination,
std::u32string_view  value 
)
inline

Converts the supplied string to a signed short value.

A ConversionException will be thrown under the following circumstances:

  • the string is empty;
  • the string to number conversion fails;
  • the resulting numeric value is out of the valid range for the numeric type.
Parameters
destinationthe destination value that is set via assignment
valuethe string view input
Exceptions
ConversionExceptionwhen the conversion fails

◆ fromString32() [8/19]

void fromString32 ( int &  destination,
std::u32string_view  value 
)
inline

Converts the supplied string to a signed int value.

A ConversionException will be thrown under the following circumstances:

  • the string is empty;
  • the string to number conversion fails;
  • the resulting numeric value is out of the valid range for the numeric type.
Parameters
destinationthe destination value that is set via assignment
valuethe string view input
Exceptions
ConversionExceptionwhen the conversion fails

◆ fromString32() [9/19]

void fromString32 ( long &  destination,
std::u32string_view  value 
)
inline

Converts the supplied string to a signed long value.

A ConversionException will be thrown under the following circumstances:

  • the string is empty;
  • the string to number conversion fails;
  • the resulting numeric value is out of the valid range for the numeric type.
Parameters
destinationthe destination value that is set via assignment
valuethe string view input
Exceptions
ConversionExceptionwhen the conversion fails

◆ fromString32() [10/19]

void fromString32 ( long long &  destination,
std::u32string_view  value 
)
inline

Converts the supplied string to a signed long long value.

A ConversionException will be thrown under the following circumstances:

  • the string is empty;
  • the string to number conversion fails;
  • the resulting numeric value is out of the valid range for the numeric type.
Parameters
destinationthe destination value that is set via assignment
valuethe string view input
Exceptions
ConversionExceptionwhen the conversion fails

◆ fromString32() [11/19]

void fromString32 ( unsigned char &  destination,
std::u32string_view  value 
)
inline

Converts the supplied string to a unsigned char value.

A ConversionException will be thrown under the following circumstances:

  • the string is empty;
  • the string to number conversion fails;
  • the resulting numeric value is out of the valid range for the numeric type.
Parameters
destinationthe destination value that is set via assignment
valuethe string view input
Exceptions
ConversionExceptionwhen the conversion fails

◆ fromString32() [12/19]

void fromString32 ( unsigned short &  destination,
std::u32string_view  value 
)
inline

Converts the supplied string to a unsigned short value.

A ConversionException will be thrown under the following circumstances:

  • the string is empty;
  • the string to number conversion fails;
  • the resulting numeric value is out of the valid range for the numeric type.
Parameters
destinationthe destination value that is set via assignment
valuethe string view input
Exceptions
ConversionExceptionwhen the conversion fails

◆ fromString32() [13/19]

void fromString32 ( unsigned int &  destination,
std::u32string_view  value 
)
inline

Converts the supplied string to a unsigned int value.

A ConversionException will be thrown under the following circumstances:

  • the string is empty;
  • the string to number conversion fails;
  • the resulting numeric value is out of the valid range for the numeric type.
Parameters
destinationthe destination value that is set via assignment
valuethe string view input
Exceptions
ConversionExceptionwhen the conversion fails

◆ fromString32() [14/19]

void fromString32 ( unsigned long &  destination,
std::u32string_view  value 
)
inline

Converts the supplied string to a unsigned long value.

A ConversionException will be thrown under the following circumstances:

  • the string is empty;
  • the string to number conversion fails;
  • the resulting numeric value is out of the valid range for the numeric type.
Parameters
destinationthe destination value that is set via assignment
valuethe string view input
Exceptions
ConversionExceptionwhen the conversion fails

◆ fromString32() [15/19]

void fromString32 ( unsigned long long &  destination,
std::u32string_view  value 
)
inline

Converts the supplied string to a unsigned long long value.

A ConversionException will be thrown under the following circumstances:

  • the string is empty;
  • the string to number conversion fails;
  • the resulting numeric value is out of the valid range for the numeric type.
Parameters
destinationthe destination value that is set via assignment
valuethe string view input
Exceptions
ConversionExceptionwhen the conversion fails

◆ fromString32() [16/19]

void fromString32 ( float &  destination,
std::u32string_view  value 
)
inline

Sets the destination value to Convert the supplied float to a UTF-32 string.

A ConversionException will be thrown under the following circumstances:

  • the string is empty;
  • the string to number conversion fails;
  • the resulting numeric value is out of the valid range for the numeric type.
Parameters
destinationthe destination value that is set via assignment
valuethe string view input
Exceptions
ConversionExceptionwhen the conversion fails

◆ fromString32() [17/19]

void fromString32 ( double &  destination,
std::u32string_view  value 
)
inline

Sets the destination value to Convert the supplied double to a UTF-32 string.

A ConversionException will be thrown under the following circumstances:

  • the string is empty;
  • the string to number conversion fails;
  • the resulting numeric value is out of the valid range for the numeric type.
Parameters
destinationthe destination value that is set via assignment
valuethe string view input
Exceptions
ConversionExceptionwhen the conversion fails

◆ fromString32() [18/19]

void fromString32 ( long double &  destination,
std::u32string_view  value 
)
inline

Sets the destination value to Convert the supplied long double to a UTF-32 string.

A ConversionException will be thrown under the following circumstances:

  • the string is empty;
  • the string to number conversion fails;
  • the resulting numeric value is out of the valid range for the numeric type.
Parameters
destinationthe destination value that is set via assignment
valuethe string view input
Exceptions
ConversionExceptionwhen the conversion fails

◆ fromString32() [19/19]

void fromString32 ( bool &  destination,
std::u32string_view  value 
)
inline

Converts the supplied string to a boolean value.

A ConversionException will be thrown under the following circumstances:

  • the string does not contain one of the case insensitive strings "false" or "true".
Parameters
destinationthe destination value that is set via assignment
valuethe string view input
Exceptions
ConversionExceptionwhen the conversion fails