Richard Boegli's CnC_Generals_Zero_Hour Fork WIP
This is documentation of Richard Boegil's Zero Hour Fork
 
Loading...
Searching...
No Matches
UString Class Reference

#include <UString.h>

Inherits RefCounted.

Public Member Functions

 UString ()
 
 UString (UInt capacity)
 
 UString (const Char *s)
 
 UString (const WChar *ws)
 
 UString (const UString &s)
 
virtual ~UString ()
 
UInt Length (void) const
 Get the length of the string.
 
void Copy (const Char *s)
 Copy string.
 
void Copy (const WChar *ws)
 
void Copy (const UString &s)
 
void Concat (const Char *s)
 Concatenate string.
 
void Concat (const WChar *ws)
 
void Concat (const UString &s)
 
Int Compare (const Char *s) const
 Compare strings.
 
Int Compare (const WChar *s) const
 
Int Compare (const UString &s) const
 
Int CompareNoCase (const Char *s) const
 Compare strings not case-sensitive.
 
Int CompareNoCase (const WChar *ws) const
 
Int CompareNoCase (const UString &s) const
 
Int Find (Char c) const
 Find the first occurance of character.
 
Int Find (WChar wc) const
 
Int FindLast (Char c) const
 Find the last occurance of a character.
 
Int FindLast (WChar c) const
 
UString SubString (const Char *s)
 Find a substring.
 
UString SubString (const WChar *ws)
 
UString SubString (const UString &s)
 
UString Left (UInt count)
 Extract left part of the string.
 
UString Middle (UInt first, UInt count)
 Extract middle part of the string.
 
UString Right (UInt count)
 Extract right part of the string.
 
void ToUpper (void)
 Convert string to uppercase.
 
void ToLower (void)
 Convert string to lowercase.
 
void Reverse (void)
 Reverse characters of string.
 
bool Trim (const Char *trimChars)
 Remove leading and trailing characters from string.
 
bool Trim (const WChar *trimChars)
 
bool Trim (const UString &trimChars)
 
bool TrimLeft (const Char *trimChars)
 Remove characters from left side of string.
 
bool TrimLeft (const WChar *trimChars)
 
bool TrimLeft (const UString &trimChars)
 
bool TrimRight (const Char *trimChars)
 Remove characters from right side of string.
 
bool TrimRight (const WChar *trimChars)
 
bool TrimRight (const UString &trimChars)
 
void ConvertToANSI (Char *buffer, UInt bufferLength) const
 
UInt Size (void) const
 Get the size (in bytes) of the string.
 
UInt Capacity (void) const
 Get the maximum number of characters this string can hold.
 
bool Resize (UInt size)
 Resize the string.
 
const WCharGet (void) const
 
UString operator= (const Char *s)
 Assignment operator.
 
UString operator= (const WChar *ws)
 
UString operator= (const UString &s)
 
UString operator+ (const Char *s)
 Addition operator (concatenate)
 
UString operator+ (const WChar *ws)
 
UString operator+ (const UString &s)
 
UString operator+= (const Char *s)
 
UString operator+= (const WChar *ws)
 
UString operator+= (const UString &s)
 
bool operator== (const Char *s)
 Equal operator (case sensitive compare)
 
bool operator== (const WChar *ws)
 
bool operator== (const UString &s)
 
bool operator!= (const Char *s)
 
bool operator!= (const WChar *ws)
 
bool operator!= (const UString &s)
 
bool operator< (const Char *s)
 Less than operator (case sensitive compare)
 
bool operator< (const WChar *ws)
 
bool operator< (const UString &s)
 
bool operator<= (const Char *s)
 
bool operator<= (const WChar *ws)
 
bool operator<= (const UString &s)
 
bool operator> (const Char *s)
 Greater than operator (case sensitive compare)
 
bool operator> (const WChar *ws)
 
bool operator> (const UString &s)
 
bool operator>= (const Char *s)
 
bool operator>= (const WChar *ws)
 
bool operator>= (const UString &s)
 
 operator const WChar * () const
 

Additional Inherited Members

- Protected Member Functions inherited from RefCounted
 RefCounted ()
 
 RefCounted (const RefCounted &)
 
const RefCountedoperator= (const RefCounted &)
 
virtual ~RefCounted ()
 
virtual bool operator== (const RefCounted &) const
 
bool operator!= (const RefCounted &) const
 
void AddReference (void)
 
virtual void Release (void)
 
int ReferenceCount (void) const
 

Detailed Description

Definition at line 43 of file UString.h.

Constructor & Destructor Documentation

◆ UString() [1/5]

UString::UString ( )

Definition at line 148 of file UString.cpp.

◆ UString() [2/5]

UString::UString ( UInt capacity)

Definition at line 171 of file UString.cpp.

◆ UString() [3/5]

UString::UString ( const Char * s)

Definition at line 195 of file UString.cpp.

◆ UString() [4/5]

UString::UString ( const WChar * ws)

Definition at line 219 of file UString.cpp.

◆ UString() [5/5]

UString::UString ( const UString & s)

Definition at line 243 of file UString.cpp.

◆ ~UString()

UString::~UString ( )
virtual

Definition at line 267 of file UString.cpp.

Member Function Documentation

◆ Capacity()

UInt UString::Capacity ( void ) const

Get the maximum number of characters this string can hold.

Definition at line 1247 of file UString.cpp.

◆ Compare() [1/3]

Int UString::Compare ( const Char * s) const

Compare strings.

Definition at line 520 of file UString.cpp.

◆ Compare() [2/3]

Int UString::Compare ( const UString & s) const

Definition at line 611 of file UString.cpp.

◆ Compare() [3/3]

Int UString::Compare ( const WChar * s) const

Definition at line 587 of file UString.cpp.

◆ CompareNoCase() [1/3]

Int UString::CompareNoCase ( const Char * s) const

Compare strings not case-sensitive.

Definition at line 636 of file UString.cpp.

◆ CompareNoCase() [2/3]

Int UString::CompareNoCase ( const UString & s) const

Definition at line 733 of file UString.cpp.

◆ CompareNoCase() [3/3]

Int UString::CompareNoCase ( const WChar * ws) const

Definition at line 708 of file UString.cpp.

◆ Concat() [1/3]

void UString::Concat ( const Char * s)

Concatenate string.

Definition at line 422 of file UString.cpp.

◆ Concat() [2/3]

void UString::Concat ( const UString & s)

Definition at line 496 of file UString.cpp.

◆ Concat() [3/3]

void UString::Concat ( const WChar * ws)

Definition at line 466 of file UString.cpp.

◆ ConvertToANSI()

void UString::ConvertToANSI ( Char * buffer,
UInt bufferLength ) const

Definition at line 1198 of file UString.cpp.

◆ Copy() [1/3]

void UString::Copy ( const Char * s)

Copy string.

Definition at line 319 of file UString.cpp.

◆ Copy() [2/3]

void UString::Copy ( const UString & s)

Definition at line 400 of file UString.cpp.

◆ Copy() [3/3]

void UString::Copy ( const WChar * ws)

Definition at line 364 of file UString.cpp.

◆ Find() [1/2]

Int UString::Find ( Char c) const

Find the first occurance of character.

Definition at line 755 of file UString.cpp.

◆ Find() [2/2]

Int UString::Find ( WChar wc) const

Definition at line 777 of file UString.cpp.

◆ FindLast() [1/2]

Int UString::FindLast ( Char c) const

Find the last occurance of a character.

Definition at line 807 of file UString.cpp.

◆ FindLast() [2/2]

Int UString::FindLast ( WChar c) const

Definition at line 829 of file UString.cpp.

◆ Get()

const WChar * UString::Get ( void ) const
inline

Definition at line 139 of file UString.h.

◆ Left()

UString UString::Left ( UInt count)

Extract left part of the string.

Definition at line 899 of file UString.cpp.

◆ Length()

UInt UString::Length ( void ) const

Get the length of the string.

Definition at line 292 of file UString.cpp.

◆ Middle()

UString UString::Middle ( UInt first,
UInt count )

Extract middle part of the string.

Definition at line 930 of file UString.cpp.

◆ operator const WChar *()

UString::operator const WChar * ( ) const
inline

Definition at line 229 of file UString.h.

◆ operator!=() [1/3]

bool UString::operator!= ( const Char * s)
inline

Definition at line 181 of file UString.h.

◆ operator!=() [2/3]

bool UString::operator!= ( const UString & s)
inline

Definition at line 187 of file UString.h.

◆ operator!=() [3/3]

bool UString::operator!= ( const WChar * ws)
inline

Definition at line 184 of file UString.h.

◆ operator+() [1/3]

UString UString::operator+ ( const Char * s)
inline

Addition operator (concatenate)

Definition at line 153 of file UString.h.

◆ operator+() [2/3]

UString UString::operator+ ( const UString & s)
inline

Definition at line 159 of file UString.h.

◆ operator+() [3/3]

UString UString::operator+ ( const WChar * ws)
inline

Definition at line 156 of file UString.h.

◆ operator+=() [1/3]

UString UString::operator+= ( const Char * s)
inline

Definition at line 162 of file UString.h.

◆ operator+=() [2/3]

UString UString::operator+= ( const UString & s)
inline

Definition at line 168 of file UString.h.

◆ operator+=() [3/3]

UString UString::operator+= ( const WChar * ws)
inline

Definition at line 165 of file UString.h.

◆ operator<() [1/3]

bool UString::operator< ( const Char * s)
inline

Less than operator (case sensitive compare)

Definition at line 191 of file UString.h.

◆ operator<() [2/3]

bool UString::operator< ( const UString & s)
inline

Definition at line 197 of file UString.h.

◆ operator<() [3/3]

bool UString::operator< ( const WChar * ws)
inline

Definition at line 194 of file UString.h.

◆ operator<=() [1/3]

bool UString::operator<= ( const Char * s)
inline

Definition at line 200 of file UString.h.

◆ operator<=() [2/3]

bool UString::operator<= ( const UString & s)
inline

Definition at line 206 of file UString.h.

◆ operator<=() [3/3]

bool UString::operator<= ( const WChar * ws)
inline

Definition at line 203 of file UString.h.

◆ operator=() [1/3]

UString UString::operator= ( const Char * s)
inline

Assignment operator.

Definition at line 143 of file UString.h.

◆ operator=() [2/3]

UString UString::operator= ( const UString & s)
inline

Definition at line 149 of file UString.h.

◆ operator=() [3/3]

UString UString::operator= ( const WChar * ws)
inline

Definition at line 146 of file UString.h.

◆ operator==() [1/3]

bool UString::operator== ( const Char * s)
inline

Equal operator (case sensitive compare)

Definition at line 172 of file UString.h.

◆ operator==() [2/3]

bool UString::operator== ( const UString & s)
inline

Definition at line 178 of file UString.h.

◆ operator==() [3/3]

bool UString::operator== ( const WChar * ws)
inline

Definition at line 175 of file UString.h.

◆ operator>() [1/3]

bool UString::operator> ( const Char * s)
inline

Greater than operator (case sensitive compare)

Definition at line 210 of file UString.h.

◆ operator>() [2/3]

bool UString::operator> ( const UString & s)
inline

Definition at line 216 of file UString.h.

◆ operator>() [3/3]

bool UString::operator> ( const WChar * ws)
inline

Definition at line 213 of file UString.h.

◆ operator>=() [1/3]

bool UString::operator>= ( const Char * s)
inline

Definition at line 219 of file UString.h.

◆ operator>=() [2/3]

bool UString::operator>= ( const UString & s)
inline

Definition at line 225 of file UString.h.

◆ operator>=() [3/3]

bool UString::operator>= ( const WChar * ws)
inline

Definition at line 222 of file UString.h.

◆ Resize()

bool UString::Resize ( UInt size)

Resize the string.

Definition at line 1269 of file UString.cpp.

◆ Reverse()

void UString::Reverse ( void )

Reverse characters of string.

Definition at line 1044 of file UString.cpp.

◆ Right()

UString UString::Right ( UInt count)

Extract right part of the string.

Definition at line 961 of file UString.cpp.

◆ Size()

UInt UString::Size ( void ) const

Get the size (in bytes) of the string.

Definition at line 1220 of file UString.cpp.

◆ SubString() [1/3]

UString UString::SubString ( const Char * s)

Find a substring.

Definition at line 860 of file UString.cpp.

◆ SubString() [2/3]

UString UString::SubString ( const UString & s)

Definition at line 876 of file UString.cpp.

◆ SubString() [3/3]

UString UString::SubString ( const WChar * ws)

Definition at line 868 of file UString.cpp.

◆ ToLower()

void UString::ToLower ( void )

Convert string to lowercase.

Definition at line 1019 of file UString.cpp.

◆ ToUpper()

void UString::ToUpper ( void )

Convert string to uppercase.

Definition at line 994 of file UString.cpp.

◆ Trim() [1/3]

bool UString::Trim ( const Char * trimChars)

Remove leading and trailing characters from string.

Definition at line 1069 of file UString.cpp.

◆ Trim() [2/3]

bool UString::Trim ( const UString & trimChars)

Definition at line 1085 of file UString.cpp.

◆ Trim() [3/3]

bool UString::Trim ( const WChar * trimChars)

Definition at line 1077 of file UString.cpp.

◆ TrimLeft() [1/3]

bool UString::TrimLeft ( const Char * trimChars)

Remove characters from left side of string.

Definition at line 1109 of file UString.cpp.

◆ TrimLeft() [2/3]

bool UString::TrimLeft ( const UString & trimChars)

Definition at line 1131 of file UString.cpp.

◆ TrimLeft() [3/3]

bool UString::TrimLeft ( const WChar * trimChars)

Definition at line 1120 of file UString.cpp.

◆ TrimRight() [1/3]

bool UString::TrimRight ( const Char * trimChars)

Remove characters from right side of string.

Definition at line 1153 of file UString.cpp.

◆ TrimRight() [2/3]

bool UString::TrimRight ( const UString & trimChars)

Definition at line 1175 of file UString.cpp.

◆ TrimRight() [3/3]

bool UString::TrimRight ( const WChar * trimChars)

Definition at line 1164 of file UString.cpp.


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