AUI Framework  develop
Cross-platform base for C++ UI apps
Loading...
Searching...
No Matches
AString Class Reference

Represents a Unicode character string. More...

#include <AUI/Common/AString.h>

Detailed Description

Constructor & Destructor Documentation

◆ AString() [1/4]

AString::AString ( const basic_string & other)
inlinenoexcept
Parameters
otherutf8 string

◆ AString() [2/4]

AString::AString ( const std::string & utf8)
noexcept
Parameters
utf8utf8 string

◆ AString() [3/4]

AString::AString ( const char * utf8)
noexcept
Parameters
utf8utf8 string

◆ AString() [4/4]

AString::AString ( std::string_view utf8)
noexcept
Parameters
utf8utf8 string

Member Function Documentation

> All members, including inherited

◆ insertAll()

template<typename OtherContainer>
void AString::insertAll ( const OtherContainer & c)
inlinenoexcept
Template Parameters
OtherContainerother container type.
Parameters
cother container

◆ toBool()

bool AString::toBool ( ) const
inlinenodiscardnoexcept
Returns
If the string equals to "true", true returned, false otherwise.

◆ toDouble()

AOptional< double > AString::toDouble ( ) const
nodiscardnoexcept
Returns
The string converted to a double number.

If conversion to int is not possible, nullopt is returned.

Examples
examples/7guis/cells/src/Formula.cpp.

◆ toDoubleOrException()

double AString::toDoubleOrException ( ) const
inlinenodiscardnoexcept
Returns
The string converted to a double number.

If conversion to int is not possible, exception is thrown.

◆ toFloat()

AOptional< float > AString::toFloat ( ) const
nodiscardnoexcept
Returns
The string converted to a float number.

If conversion to int is not possible, nullopt is returned.

◆ toInt()

AOptional< int > AString::toInt ( ) const
nodiscardnoexcept
Returns
The string converted to an integer value using base 10. If the string starts with 0x or 0X, the base 16 used.

If conversion to int is not possible, nullopt is returned.

◆ toIntOrException()

int AString::toIntOrException ( ) const
inlinenodiscard
Returns
The string converted to an integer value using base 10. If the string starts with 0x or 0X, the base 16 used.

If conversion to int is not possible, exception is thrown.

◆ toLongInt()

AOptional< int64_t > AString::toLongInt ( ) const
nodiscardnoexcept
Returns
The string converted to an integer value using base 10. If the string starts with 0x or 0X, the base 16 used.

If conversion to int is not possible, nullopt is returned.

◆ toLongIntOrException()

int64_t AString::toLongIntOrException ( ) const
inlinenodiscard
Returns
The string converted to an integer value using base 10. If the string starts with 0x or 0X, the base 16 used.

If conversion to int is not possible, nullopt is returned.

◆ toNumber()

AOptional< int > AString::toNumber ( aui::ranged_number< int, 2, 36 > base = TO_NUMBER_BASE_DEC) const
noexcept

◆ toNumberOrException()

int AString::toNumberOrException ( aui::ranged_number< int, 2, 36 > base = TO_NUMBER_BASE_DEC) const
inline
See also
toNumber

◆ toStdString()

std::string AString::toStdString ( ) const
noexcept
Returns
utf8-encoded std::string.

◆ toUInt()

AOptional< unsigned > AString::toUInt ( ) const
nodiscardnoexcept
Returns
The string converted to an integer value using base 10. If the string starts with 0x or 0X, the base 16 used.

If conversion to int is not possible, exception is thrown.

◆ toUIntOrException()

unsigned AString::toUIntOrException ( ) const
inlinenodiscard
Returns
The string converted to an integer value using base 10. If the string starts with 0x or 0X, the base 16 used.

If conversion to int is not possible, exception is thrown.