OpenLexocad  27.1
Base::String Class Reference

A Utf-16 (windows) or ucs4 (unix) encoded string class. More...

#include <String.h>

Public Member Functions

 String ()
 Constructs an empty string. More...
 
 String (const std::wstring &s)
 Constructs a string from a std::wstring. More...
 
 String (const QString &s)
 Constructs a string from a QString. More...
 
 String (const wchar_t *s)
 Constructs a string from an array of wchar_t. More...
 
 String (const Base::String &s)
 Constructs a string from an array of wchar_t. More...
 
bool operator== (const Base::String &other) const
 
bool operator!= (const Base::String &other) const
 
bool operator< (const Base::String &other) const
 
bool operator> (const Base::String &other) const
 
Base::Stringoperator= (const Base::String &rhs)
 
Base::String operator+ (const Base::String &other) const
 
Base::Stringoperator+= (const Base::String &other)
 
int size () const
 
int lenght () const
 
bool empty () const
 
Base::String substr (size_t pos=0, size_t len=std::string::npos) const
 
std::wstring toWString () const
 Returns Base::String as a std::wstring. More...
 
const wchar_t * c_str () const
 Returns wchar_t array. More...
 
bool isEqual (const Base::String &other) const
 

Friends

class StringTool
 
LX_BASE_EXPORT std::ostream & operator<< (std::ostream &o, const Base::String &s)
 

Detailed Description

A Utf-16 (windows) or ucs4 (unix) encoded string class.

Constructor & Destructor Documentation

◆ String() [1/5]

Base::String::String ( )

Constructs an empty string.

◆ String() [2/5]

Base::String::String ( const std::wstring &  s)

Constructs a string from a std::wstring.

◆ String() [3/5]

Base::String::String ( const QString &  s)

Constructs a string from a QString.

◆ String() [4/5]

Base::String::String ( const wchar_t *  s)

Constructs a string from an array of wchar_t.

◆ String() [5/5]

Base::String::String ( const Base::String s)

Constructs a string from an array of wchar_t.

Copy constructor

Member Function Documentation

◆ c_str()

const wchar_t* Base::String::c_str ( ) const
inline

Returns wchar_t array.

◆ empty()

bool Base::String::empty ( ) const
inline

◆ isEqual()

bool Base::String::isEqual ( const Base::String other) const

◆ lenght()

int Base::String::lenght ( ) const
inline

◆ operator!=()

bool Base::String::operator!= ( const Base::String other) const

◆ operator+()

Base::String Base::String::operator+ ( const Base::String other) const

◆ operator+=()

Base::String& Base::String::operator+= ( const Base::String other)

◆ operator<()

bool Base::String::operator< ( const Base::String other) const

◆ operator=()

Base::String& Base::String::operator= ( const Base::String rhs)

◆ operator==()

bool Base::String::operator== ( const Base::String other) const

◆ operator>()

bool Base::String::operator> ( const Base::String other) const

◆ size()

int Base::String::size ( ) const
inline

◆ substr()

Base::String Base::String::substr ( size_t  pos = 0,
size_t  len = std::string::npos 
) const

◆ toWString()

std::wstring Base::String::toWString ( ) const

Returns Base::String as a std::wstring.

Friends And Related Function Documentation

◆ operator<<

LX_BASE_EXPORT std::ostream& operator<< ( std::ostream &  o,
const Base::String s 
)
friend

◆ StringTool

friend class StringTool
friend

The documentation for this class was generated from the following file: