CsString  1.4.0
CsString::CsChar Class Reference

Represents a single code point. More...

Public Member Functions

 CsChar ()
 
template<typename T = int>
 CsChar (char c)
 
 CsChar (char32_t c)
 
 CsChar (int c)
 
bool operator!= (const CsString::CsChar &other) const
 
bool operator< (const CsString::CsChar &other) const
 
bool operator<= (const CsString::CsChar &other) const
 
CsString::CsChar & operator= (char c) &
 
CsString::CsChar & operator= (char32_t c) &
 
bool operator== (const CsString::CsChar &other) const
 
bool operator> (const CsString::CsChar &other) const
 
bool operator>= (const CsString::CsChar &other) const
 
uint32_t unicode () const
 

Detailed Description

A CsChar represents a single code point. The internal representation is a uint32_t.

Constructor & Destructor Documentation

CsString::CsChar::CsChar ( )
inline

Constructs a CsChar.

template<typename T = int>
CsString::CsChar::CsChar ( char  c)
inline

Constructs a CsChar using the specified code point c.

This constructor is only permitted if CS_STRING_ALLOW_UNSAFE is defined.

CsString::CsChar::CsChar ( char32_t  c)
inline

Constructs a CsChar using the specified code point c.

CsString::CsChar::CsChar ( int  c)
inline

Constructs a CsChar using the specified code point c.

Member Function Documentation

bool CsString::CsChar::operator!= ( const CsString::CsChar &  other) const
inline

Compares the contents of the specified CsChar other with this CsChar. The value of the code point in other must be not equal to the code point in this CsChar.

Returns true if other is not equal to this CsChar.

bool CsString::CsChar::operator< ( const CsString::CsChar &  other) const
inline

Compares the contents of the specified CsChar other with this CsChar. The value of the code point in other must be less than the code point in this CsChar.

Returns true if other is less than this CsChar.

bool CsString::CsChar::operator<= ( const CsString::CsChar &  other) const
inline

Compares the contents of the specified CsChar other with this CsChar. The value of the code point in other must be less than or equal to the code point in this CsChar.

Returns true if other is less than or equal to this CsChar.

CsString::CsChar & CsString::CsChar::operator= ( char  c) &
inline

Assigns the specified char c to this CsChar. Returns a reference to a CsChar.

This assignment is only permitted if CS_STRING_ALLOW_UNSAFE is defined.

CsString::CsChar & CsString::CsChar::operator= ( char32_t  c) &
inline

Assigns the specified char32 c to this CsChar. Returns a reference to a CsChar.

bool CsString::CsChar::operator== ( const CsString::CsChar &  other) const
inline

Compares the contents of the specified CsChar other with this CsChar. The value of the code point in other must be equal to the code point in this CsChar.

Returns true if other is equal to this CsChar.

bool CsString::CsChar::operator> ( const CsString::CsChar &  other) const
inline

Compares the contents of the specified CsChar other with this CsChar. The value of the code point in other must be greater than the code point in this CsChar.

Returns true if other is greater than this CsChar.

bool CsString::CsChar::operator>= ( const CsString::CsChar &  other) const
inline

Compares the contents of the specified CsChar other with this CsChar. The value of the code point in other must be greater than or equal to the code point in this CsChar.

Returns true if other is greater than or equal to this CsChar.

uint32_t CsString::CsChar::unicode ( ) const
inline

Returns the unicode value for this CsChar.