GigaPasjans
Loading...
Searching...
No Matches
WideString Class Reference

Represents a mutable sequence of utf-16 characters, providing various member functions for string manipulation, comparison, and conversion. More...

#include <WideString.h>

Public Member Functions

 WideString ()
 Initializes a new instance of the WideString class.
 
 WideString (const std::wstring &data)
 Initializes a new instance of the WideString class.
 
 WideString (const wchar_t *data)
 Initializes a new instance of the WideString class.
 
 WideString (const wchar_t *data, int32 length)
 Initializes a new instance of the WideString class.
 
 WideString (const wchar_t *start, const wchar_t *end)
 Initializes a new instance of the WideString class.
 
 WideString (wchar_t c)
 Initializes a new instance of the WideString class.
 
 WideString (const WideString &str)
 Initializes a new instance of the WideString class.
 
 WideString (WideString &&str) noexcept
 
WideStringoperator= (const WideString &str)
 
WideStringoperator= (WideString &&str) noexcept
 
bool operator== (const WideString &str) const
 
WideString operator+ (const wchar_t *str) const
 
WideString operator+ (const WideString &str) const
 
void Set (wchar_t *data, int32 length)
 Sets an array of characters to the string.
 
void Allocate (int32 length)
 Use only when string is empty.
 
wchar_t * Get () const
 Gets a raw char sequence.
 
int32 GetLength () const
 
bool StartsWith (const WideString &other) const
 
int32 HashCode () const
 

Detailed Description

Represents a mutable sequence of utf-16 characters, providing various member functions for string manipulation, comparison, and conversion.

Constructor & Destructor Documentation

◆ WideString() [1/2]

WideString::WideString ( const std::wstring & data)
inline

Initializes a new instance of the WideString class.

Parameters
data

◆ WideString() [2/2]

WideString::WideString ( const wchar_t * data)
inline

Initializes a new instance of the WideString class.

Parameters
data

Member Function Documentation

◆ Allocate()

void WideString::Allocate ( int32 length)

Use only when string is empty.

Parameters
length

◆ Get()

wchar_t * WideString::Get ( ) const
inlinenodiscard

Gets a raw char sequence.

Returns

◆ Set()

void WideString::Set ( wchar_t * data,
int32 length )

Sets an array of characters to the string.

Parameters
dataThe pointer to the start of an array of characters to set (UTF-8). This array need not be null-terminated, and null characters are not treated specially.
lengthThe number of characters to assign.

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