Public Member Functions | Static Public Member Functions | Static Protected Member Functions

zeus::TString Class Reference

#include <String.h>

Inheritance diagram for zeus::TString:
zeus::IString zeus::IValueType

List of all members.

Public Member Functions

 TString ()
 TString (const wchar_t *data)
 TString (const char *data)
 TString (wchar_t wcChar, Uint uiCount=1)
 TString (char cChar, Uint uiCount=1)
 TString (const TString &strString)
 TString (const IString &strString)
 TString (const IString *pString)
 TString (Int32 lValue)
 TString (Int64 ldValue)
 TString (int iValue)
 TString (Uint32 ulValue)
 TString (Uint64 uldValue)
 TString (unsigned int uiValue)
 TString (Float fValue)
 TString (Float fValue, Uint uiDigits)
 TString (bool bValue)
 TString (const TString &rstr1, const TString &rstr2)
 TString (const TString &rstr, const wchar_t *pwc)
 TString (const wchar_t *pwc, const TString &rstr)
 TString (const wchar_t *pwc1, const wchar_t *pwc2)
 TString (const TString &rstr1, const TString &rstr2, const TString &rstr3)
 TString (const TString &rstr1, const TString &rstr2, const wchar_t *pwc)
 TString (const TString &rstr1, const wchar_t *pwc, const TString &rstr2)
 TString (const TString &rstr, const wchar_t *pwc1, const wchar_t *pwc2)
 TString (const wchar_t *pwc, const TString &rstr1, const TString &rstr2)
 TString (const wchar_t *pwc1, const TString &rstr, const wchar_t *pwc2)
 TString (const wchar_t *pwc1, const wchar_t *pwc2, const TString &rstr)
 TString (const wchar_t *pwc1, const wchar_t *pwc2, const wchar_t *pwc3)
 TString (wchar_t *pwcData, Uint uiBufferSize, bool bAdoptPointer)
virtual ~TString ()
TStringoperator= (const TString &rInstr)
TStringoperator= (const IString &rInstr)
TStringoperator= (const IString *pInstr)
TStringoperator= (const wchar_t *pData)
TStringoperator= (const Int iData)
TStringoperator= (const int iData)
TStringoperator= (const Uint uiData)
TStringoperator= (const unsigned int uiData)
TStringoperator= (const Float fData)
TStringoperator= (const char *pData)
TStringoperator= (bool bData)
bool operator== (const TString &rInstr) const
bool operator== (const IString &rInstr) const
bool operator== (const IString *pInstr) const
bool operator== (const wchar_t *pInbuffer) const
bool operator== (const char *pInbuffer) const
bool operator== (const Float fData) const
bool operator== (const Int iData) const
bool operator== (const int iData) const
bool operator== (const Uint uiData) const
bool operator== (const unsigned int uiData) const
bool operator== (bool bData) const
TString operator+ (const TString &rInstr) const
TString operator+ (const IString &rInstr) const
TString operator+ (const wchar_t *pInbuffer) const
TString operator+ (const char *pInbuffer) const
TString operator+ (const wchar_t wc) const
TString operator+ (const char c) const
TString operator+ (const Int iInval) const
TString operator+ (const int iInval) const
TString operator+ (const Uint uiInval) const
TString operator+ (const unsigned int uiInval) const
TString operator+ (const Float fInval) const
bool operator!= (const TString &rInstr) const
bool operator!= (const IString &rInstr) const
bool operator!= (const IString *pInstr) const
bool operator!= (const wchar_t *pInbuffer) const
bool operator!= (const char *pInbuffer) const
bool operator!= (const Float fData) const
bool operator!= (const Int iData) const
bool operator!= (const int iData) const
bool operator!= (const Uint uiData) const
bool operator!= (const unsigned int uiData) const
bool operator!= (const bool bData) const
TStringoperator+= (const TString &rInstr)
TStringoperator+= (const IString &rInstr)
TStringoperator+= (const wchar_t *pInbuffer)
TStringoperator+= (const char *pInbuffer)
TStringoperator+= (const wchar_t wc)
TStringoperator+= (const char c)
TStringoperator+= (const Int iInval)
TStringoperator+= (const int iInval)
TStringoperator+= (const Uint uiInval)
TStringoperator+= (const unsigned int uiInval)
TStringoperator+= (const Float fInval)
wchar_t & operator[] (Int iIndex)
bool operator< (const TString &rInStr) const
bool operator<= (const TString &rInStr) const
bool operator> (const TString &rInStr) const
bool operator>= (const TString &rInStr) const
bool containsChar (const wchar_t wcChar) const
bool containsCharOf (const wchar_t *wcChars) const
Int getFirstCharPos (const wchar_t wcChar) const
Int getFirstCharPosOf (const wchar_t *wcChars) const
Int getLastCharPos (const wchar_t wcChar) const
Int getLastCharPosOf (const wchar_t *wcChars) const
TString deleteSubString (Int iStartIndex, Int iEndIndex=IntMax) const
TString getSubString (Int iStartIndex, Int iEndIndex=IntMax) const
TString getLeft (Int iCharCount) const
TString getRight (Int iCharCount) const
TString deleteLeft (Int iCharCount) const
TString deleteRight (Int iCharCount) const
Int getSubStringCount (const IString &rSubstring) const
TString insert (Int iIndex, const IString &rStrToInsert) const
TString insert (Int iIndex, const TString &rStrToInsert) const
TString remove (const IString &rToRemove, Int *pReplaces=NULL) const
TString remove (const TString &strToRemove, Int *pReplaces=NULL) const
TString removeFirst (const IString &rToRemove) const
TString removeFirst (const TString &rToRemove) const
TString replace (const IString &rToRemove, const IString &rReplace, Int *pReplaces=NULL) const
TString replace (const TString &rToRemove, const TString &rReplace, Int *pReplaces=NULL) const
TString replaceFirst (const IString &rToRemove, const IString &rReplace) const
TString replaceFirst (const TString &rToRemove, const TString &rReplace) const
TString toUpperCase () const
TString toLowerCase () const
TString trim () const
TString trimLeft () const
TString trimRight () const
TString terminated (const IString &rTermination) const
TString terminated (const TString &rTermination) const
TString enclosed (const IString &rEnclosure) const
TString enclosed (const TString &rEnclosure) const
TString enquoted () const
Int64 getHash () const
const wchar_t * getPtrOfChar (Int iStartIndex, wchar_t wcChar) const
const wchar_t * getPtrOfFirstChar (wchar_t wcChar) const
const wchar_t * getPtrOfLastChar (wchar_t wcChar) const
const wchar_t * getPtrOfStr (Int iStartIndex, const IString &rSubString) const
const wchar_t * getPtrOfStr (Int iStartIndex, const TString &rSubString) const
const wchar_t * getPtrOfFirstStr (const IString &rSubString) const
const wchar_t * getPtrOfFirstStr (const TString &rSubString) const
const wchar_t * getPtrOfLastStr (const IString &rSubString) const
const wchar_t * getPtrOfLastStr (const TString &rSubString) const
TString extractSubString (const TString &strBefore, const TString &strAfter=L"", Int iSearchStartPosForBeforeString=0, Int *piSubStringPos=NULL) const
virtual const wchar_t *MQUALIFIER c_bstr () const
virtual const char *MQUALIFIER c_str (bool *pError) const
virtual Float MQUALIFIER toFloat (Float fPredef=0.0, bool *pbError=NULL) const
virtual Int MQUALIFIER toInt (Int iPredef=0, bool *pbError=NULL) const
virtual Uint MQUALIFIER toUint (Uint uiPredef=0, bool *pbError=NULL) const
virtual Timeval MQUALIFIER toTimeval (Timeval tmPredef=0, bool *pbError=NULL) const
virtual bool MQUALIFIER toBool (bool bPredef=false, bool *pbError=NULL) const
virtual bool MQUALIFIER isFloat () const
virtual bool MQUALIFIER isInt () const
virtual bool MQUALIFIER isBool () const
virtual bool MQUALIFIER equals (const wchar_t *pInbuffer, bool bIgnoreCase=false) const
virtual bool MQUALIFIER equalsStr (const IString &rInstr, bool bIgnoreCase=false) const
virtual void MQUALIFIER concat (const wchar_t *pInbuffer)
virtual void MQUALIFIER concatStr (const IString &rInstr)
virtual void MQUALIFIER assign (const wchar_t *pInbuffer)
virtual void MQUALIFIER assignStr (const IString &rInstr)
virtual Int MQUALIFIER getSize () const
virtual wchar_t MQUALIFIER getChar (Int iIndex) const
virtual Int MQUALIFIER getFirstPos (const wchar_t *pSubBuffer) const
virtual Int MQUALIFIER getFirstPosStr (const IString &rSubString) const
virtual Int MQUALIFIER getLastPos (const wchar_t *pSubBuffer) const
virtual Int MQUALIFIER getLastPosStr (const IString &rSubString) const
virtual void MQUALIFIER clear ()
virtual bool MQUALIFIER isEmpty () const
virtual bool MQUALIFIER endsWith (const wchar_t *pString) const
virtual bool MQUALIFIER endsWithStr (const IString &rString) const
virtual bool MQUALIFIER startsWith (const wchar_t *pString) const
virtual bool MQUALIFIER startsWithStr (const IString &rString) const
virtual Int MQUALIFIER compareTo (const IString &rString) const
virtual bool MQUALIFIER contains (const wchar_t *pSubString) const
virtual bool MQUALIFIER containsStr (const IString &rSubString) const
virtual Int MQUALIFIER getPos (Int iStartIndex, const wchar_t *pSubBuffer) const
virtual Int MQUALIFIER getPosOfStr (Int iStartIndex, const IString &rSubString) const

Static Public Member Functions

static TString formatFloat (Float fValue, Float fRoundPrecision=0, Uint uiTailingZeros=0, Uint uiLeadingZeros=1)
static TString formatInt (Int iValue, Uint uiLeadingZeros)
static TString format (const char *pcFormat,...)
static TString format (const wchar_t *pwcFormat,...)
static TString format (const IString &rFormat,...)
static TString formatV (const char *pcFormat, va_list Arg)
static TString formatV (const wchar_t *pwcFormat, va_list Arg)
static TString formatV (const IString &rFormat, va_list Arg)
static TString transcode (const IByteArray &list)
static TByteArray transcode (const TString &rValue, bool bAsWideChar, bool bNullTerminated=true)
static TByteArray transcode (const IString &rValue, bool bAsWideChar, bool bNullTerminated=true)
static TString trimExt (const IString &rSource, const IString &rChars, bool bLeft=true, bool bRight=true)

Static Protected Member Functions

static TString convertDouble (const Float &rfValue, Int iDigit=15)

Detailed Description

This is the implementation of the Zeus String. The Zeus String is a null terminated wide string array (16bit or 32bit depending on the platform). The last character of the string is the NULL-character which is used to mark the end of the string.
There are different methods for convertions such as number, float and 8bit array convertions.
The string class is a stack type and implements the IString-interface. This interface is used to define other interface methods having string parameters.


Constructor & Destructor Documentation

TString::TString (  )

Creates an empty string

zeus::TString::TString ( const wchar_t *  pData ) [inline]

Creates a string out of a wide char array. The array must be NULL terminated

Parameters:
pData: wide array containing the data
zeus::TString::TString ( const char *  pData ) [inline]

Creates a string out of a regular char array. The array must be NULL terminated

Parameters:
pData: char array containing the data
TString::TString ( wchar_t  wcChar,
Uint  uiCount = 1 
)

Creates a string with n-wide characters

Parameters:
wcChar: wide character
uiCount: number of repetitions
TString::TString ( char  cChar,
Uint  uiCount = 1 
)

Creates a string with n-characters

Parameters:
cChar: Character
uiCount: number of repetitions
zeus::TString::TString ( const TString rString ) [inline]

Copy constructor

Parameters:
rString: string to copy
zeus::TString::TString ( const IString rString ) [inline]

Creates a string out of an other string by interface.

Parameters:
rString: string to copy
TString::TString ( const IString pString )

Creates a string out of an optional string pointer.

Parameters:
pString: string object
zeus::TString::TString ( Int32  lValue ) [inline]

Creates a new string out of a int32 value.

Parameters:
lValue: int32 value
zeus::TString::TString ( Int64  ldValue ) [inline]

Creates a new string out of a int64 value.

Parameters:
ldValue: int32 value
zeus::TString::TString ( int  iValue ) [inline]

Creates a new string out of a int value.

Parameters:
iValue: int value
zeus::TString::TString ( Uint32  ulValue ) [inline]

Creates a new string out of a unsigned int32 value.

Parameters:
ulValue: Uint32 value
zeus::TString::TString ( Uint64  uldValue ) [inline]

Creates a new string out of a unsigned long 64 value.

Parameters:
uldValue: unsigned long 64 value
zeus::TString::TString ( unsigned int  uiValue ) [inline]

Creates a new string out of a unsigned int value.

Parameters:
uiValue: unsigned int value
zeus::TString::TString ( Float  fValue ) [inline]

Konstruktor.

Parameters:
fValue: float value
zeus::TString::TString ( Float  fValue,
Uint  uiDigits 
) [inline]

Konstruktor.

Parameters:
fValue: double value
uiDigits: Digits to convert
zeus::TString::TString ( bool  bValue ) [inline]

Konstruktor.

Parameters:
bValue: boolean value
TString::TString ( const TString rstr1,
const TString rstr2 
)

One of 4 constructors for the concatenation of 2 strings with increased performance.

TString::TString ( const TString rstr,
const wchar_t *  pwc 
)

One of 4 constructors for the concatenation of 2 strings with increased performance.

TString::TString ( const wchar_t *  pwc,
const TString rstr 
)

One of 4 constructors for the concatenation of 2 strings with increased performance.

TString::TString ( const wchar_t *  pwc1,
const wchar_t *  pwc2 
)

One of 4 constructors for the concatenation of 2 strings with increased performance.

TString::TString ( const TString rstr1,
const TString rstr2,
const TString rstr3 
)

One of 8 constructors for the concatenation of 3 strings with increased performance.

TString::TString ( const TString rstr1,
const TString rstr2,
const wchar_t *  pwc 
)

One of 8 constructors for the concatenation of 3 strings with increased performance.

TString::TString ( const TString rstr1,
const wchar_t *  pwc,
const TString rstr2 
)

One of 8 constructors for the concatenation of 3 strings with increased performance.

TString::TString ( const TString rstr,
const wchar_t *  pwc1,
const wchar_t *  pwc2 
)

One of 8 constructors for the concatenation of 3 strings with increased performance.

TString::TString ( const wchar_t *  pwc,
const TString rstr1,
const TString rstr2 
)

One of 8 constructors for the concatenation of 3 strings with increased performance.

TString::TString ( const wchar_t *  pwc1,
const TString rstr,
const wchar_t *  pwc2 
)

One of 8 constructors for the concatenation of 3 strings with increased performance.

TString::TString ( const wchar_t *  pwc1,
const wchar_t *  pwc2,
const TString rstr 
)

One of 8 constructors for the concatenation of 3 strings with increased performance.

TString::TString ( const wchar_t *  pwc1,
const wchar_t *  pwc2,
const wchar_t *  pwc3 
)

One of 8 constructors for the concatenation of 3 strings with increased performance.

zeus::TString::TString ( wchar_t *  pwcData,
Uint  uiBufferSize,
bool  bAdoptPointer 
) [inline]

Advanced constructor to create a string directly from a buffer

virtual zeus::TString::~TString (  ) [inline, virtual]

Destroys the string and its arrays


Member Function Documentation

void MQUALIFIER TString::assign ( const wchar_t *  pInbuffer ) [virtual]
See also:
IString::assign

Implements zeus::IString.

void MQUALIFIER zeus::TString::assignStr ( const IString rInstr ) [inline, virtual]
See also:
IString::assignStr

Implements zeus::IString.

const wchar_t *MQUALIFIER zeus::TString::c_bstr (  ) const [inline, virtual]
See also:
IString::c_bstr

Implements zeus::IString.

const char *MQUALIFIER zeus::TString::c_str ( bool *  pError ) const [inline, virtual]
See also:
IString::c_str

Implements zeus::IString.

void MQUALIFIER zeus::TString::clear (  ) [inline, virtual]
See also:
IString::clear

Implements zeus::IString.

Int MQUALIFIER TString::compareTo ( const IString rString ) const [virtual]
See also:
IString::compareTo

Implements zeus::IString.

void MQUALIFIER TString::concat ( const wchar_t *  pInbuffer ) [virtual]
See also:
IString::concat

Implements zeus::IString.

void MQUALIFIER zeus::TString::concatStr ( const IString rInstr ) [inline, virtual]
See also:
IString::concatStr

Implements zeus::IString.

bool MQUALIFIER zeus::TString::contains ( const wchar_t *  pSubString ) const [inline, virtual]
See also:
IString::contains

Implements zeus::IString.

bool zeus::TString::containsChar ( const wchar_t  wcChar ) const [inline]

Checks if a char is contained by the string

Parameters:
wcChar: Char to check
Return values:
true: char found
false,:No such char found
bool TString::containsCharOf ( const wchar_t *  wcChars ) const

Checks if a char of an array of chars is contained by the string. Special case is handled if the set of chars is empty. The empty set is always a part of each set.

Parameters:
wcChars: array of chars to check (null terminated)
Return values:
true: char found
false,:No such char found
bool MQUALIFIER zeus::TString::containsStr ( const IString rSubString ) const [inline, virtual]
See also:
IString::containsStr

Implements zeus::IString.

TString TString::convertDouble ( const Float &  rfValue,
Int  iDigit = 15 
) [static, protected]

Konvertieren eines Doublewerts in einen StString

Parameters:
rfValue: double Wert
iDigit: Number of digits
Returns:
Formatierter String
TString zeus::TString::deleteLeft ( Int  iCharCount ) const [inline]

This method deletes the left substring (begins at index 0 to index iCharCount -1

Parameters:
iCharCount: number of characters
Returns:
sub string
TString zeus::TString::deleteRight ( Int  iCharCount ) const [inline]

This method deletes the right substring (begins at index size - ulCharCount to size-1

Parameters:
iCharCount: number of characters
Returns:
sub string
TString TString::deleteSubString ( Int  iStartIndex,
Int  iEndIndex = IntMax 
) const

returns the result of a substring remove.

Parameters:
iStartIndex: Start index
iEndIndex: end index
Returns:
new string
TString zeus::TString::enclosed ( const TString rEnclosure ) const [inline]

Overload the method enclosed() for TString.

Parameters:
rEnclosure: string used to enclose
Returns:
new string
TString zeus::TString::enclosed ( const IString rEnclosure ) const [inline]

Returns a string enclosed by rEnclosure, but does not add the enclosure wherever it already exists.

Parameters:
rEnclosure: String must start and end with this substring
Returns:
new string
bool MQUALIFIER zeus::TString::endsWith ( const wchar_t *  pString ) const [inline, virtual]
See also:
IString::endsWith

Implements zeus::IString.

bool MQUALIFIER TString::endsWithStr ( const IString rString ) const [virtual]
See also:
IString::endsWithStr

Implements zeus::IString.

TString zeus::TString::enquoted (  ) const [inline]

Returns a string enquoted by ", but does not add the quotes wherever they already exist.

Returns:
new string
bool MQUALIFIER TString::equals ( const wchar_t *  pInbuffer,
bool  bIgnoreCase = false 
) const [virtual]
See also:
IString::equals

Implements zeus::IString.

bool MQUALIFIER zeus::TString::equalsStr ( const IString rInstr,
bool  bIgnoreCase = false 
) const [inline, virtual]
See also:
IString::equalsStr

Implements zeus::IString.

TString TString::extractSubString ( const TString strBefore,
const TString strAfter = L"",
Int  iSearchStartPosForBeforeString = 0,
Int *  piSubStringPos = NULL 
) const

Extract a sub string by giving the strings before and after.

Parameters:
strBefore[IN] : The string before the sub string desired. If empty, extraction starts right after iSearchStartPosForBeforeString.
strAfter[IN] : Optional: The string after the sub string desired. If empty, the entire sub string behind strBefore will be extracted.

If both strBefore and strAfter are empty, the entire string behind iSearchStartPosForBeforeString will be returned, so if this parameter is 0, the entire string.

Parameters:
iSearchStartPosForBeforeString[IN] : Optional: The position to start the search for strBefore.
piSubStringPos[OUT]: Optional: The index position of the sub string extracted, if found, -1 otherwise. Useful for iterative extractions.
Returns:
: The sub string extracted.
TString zeus::TString::format ( const char *  pcFormat,
  ... 
) [inline, static]

sets a formated string using the standard C formatting of string. See also std::sprintf and std::wsprintf

Parameters:
pcFormat: format string
TString zeus::TString::format ( const wchar_t *  pwcFormat,
  ... 
) [inline, static]

sets a formated string using the standard C formatting of string. See also std::sprintf and std::wsprintf

Parameters:
pwcFormat: format string
TString zeus::TString::format ( const IString rFormat,
  ... 
) [inline, static]

sets a formated string using the standard C formatting of string. See also std::sprintf and std::wsprintf

Parameters:
rFormat: format string
TString TString::formatFloat ( Float  fValue,
Float  fRoundPrecision = 0,
Uint  uiTailingZeros = 0,
Uint  uiLeadingZeros = 1 
) [static]

Converts a float value into a string value using a special format

See also:
TFloat::format
TString TString::formatInt ( Int  iValue,
Uint  uiLeadingZeros 
) [static]

Converts a int value into a string value using a special format

See also:
TFloat::format
TString TString::formatV ( const IString rFormat,
va_list  Arg 
) [static]

sets a formated string using the standard C formatting of string. See also std::vsprintf and std::vwsprintf

TString TString::formatV ( const char *  pcFormat,
va_list  Arg 
) [static]

sets a formated string using the standard C formatting of string. See also std::vsprintf and std::vwsprintf

TString TString::formatV ( const wchar_t *  pwcFormat,
va_list  Arg 
) [static]

sets a formated string using the standard C formatting of string. See also std::vsprintf and std::vwsprintf

wchar_t MQUALIFIER zeus::TString::getChar ( Int  iIndex ) const [inline, virtual]
See also:
IString::getChar

Implements zeus::IString.

Int TString::getFirstCharPos ( const wchar_t  wcChar ) const

Returns the first position index of a character inside the string

Parameters:
wcChar: character to find
Return values:
>=0: character found
-1: character not found
Int TString::getFirstCharPosOf ( const wchar_t *  wcChars ) const

Get the first position for a set of characters.

Parameters:
wcChars[IN]: Set of chars to be searched for.
Returns:
Position index of the first character found.
Int MQUALIFIER zeus::TString::getFirstPos ( const wchar_t *  pSubBuffer ) const [inline, virtual]
See also:
IString::getFirstPos

Implements zeus::IString.

Int MQUALIFIER zeus::TString::getFirstPosStr ( const IString rSubString ) const [inline, virtual]
See also:
IString::getFirstPosStr

Implements zeus::IString.

Int64 TString::getHash (  ) const

This method returns the hash of the unicode string

Int TString::getLastCharPos ( const wchar_t  wcChar ) const

Returns the last position index of a character inside the string

Parameters:
wcChar: character to find
Return values:
>=0: character found
-1: character not found
Int TString::getLastCharPosOf ( const wchar_t *  wcChars ) const

Get the first position for a set of characters.

Parameters:
wcChars[IN]: Set of chars to be searched for.
Returns:
Position index of the first character found.
Int MQUALIFIER TString::getLastPos ( const wchar_t *  pSubBuffer ) const [virtual]
See also:
IString::getLastPos

Implements zeus::IString.

Int MQUALIFIER zeus::TString::getLastPosStr ( const IString rSubString ) const [inline, virtual]
See also:
IString::getLastPosStr

Implements zeus::IString.

TString zeus::TString::getLeft ( Int  iCharCount ) const [inline]

This method returns the left substring (begins at index 0 to index iCharCount -1

Parameters:
iCharCount: number of characters
Returns:
sub string
See also:
TString::getSubString
Int MQUALIFIER TString::getPos ( Int  iStartIndex,
const wchar_t *  pSubBuffer 
) const [virtual]

Die Suche nach dem SubString wurde nach dem Knuth-Morris-Pratt Verfahren implementiert. In einem Preprocessing-Verfahren wird aus dem gesuchten SubString eine Sprungtabelle erstellt. Je nach dem, wieviele Zeichen bei der Suche uebereinstimmten, kann direkt eine bestimmte Distanz gesprungen werden, falls das darauffolgende Zeichen nicht uebereinstimmt.

Preprocessing Algorithmus:
Initialisiere die Tabelle mit Sprungweite 1
Initialisiere die Vergleichsvariable k mit 0
Wiederhole solange bis Ende des SubStrings erreicht

  • Falls das Zeichen[i] ungleich Zeichen[k] ist dann Setze die Sprungweite[i+1] = i+1
  • Sonst setze Sprungweite[i+1] = Sprungweite[i] und wenn i groesser als 0 ist dann inkrementiere k um eins

    See also:
    IString::getPos

Implements zeus::IString.

Int MQUALIFIER zeus::TString::getPosOfStr ( Int  iStartIndex,
const IString rSubString 
) const [inline, virtual]
See also:
IString::getPosOfStr

Implements zeus::IString.

const wchar_t * TString::getPtrOfChar ( Int  iStartIndex,
wchar_t  wcChar 
) const

returns the pointer of the first occurence of a character after StartIndex

Parameters:
iStartIndex: search start index
wcChar: character to search
Returns:
Pointer to the first character wcChar or NULL if no such character is found
const wchar_t * TString::getPtrOfFirstChar ( wchar_t  wcChar ) const

returns the pointer of the first occurence of a character

Parameters:
wcChar: character to search
Returns:
Pointer to the first character wcChar or NULL if no such character is found
const wchar_t * zeus::TString::getPtrOfFirstStr ( const TString rSubString ) const [inline]
const wchar_t * TString::getPtrOfFirstStr ( const IString rSubString ) const

returns the pointer of the first occurence of a substring

Parameters:
rSubString: substring to search
Returns:
Pointer to the first substring or NULL if no such substring is found
const wchar_t * TString::getPtrOfLastChar ( wchar_t  wcChar ) const

returns the pointer of the last occurence of a character

Parameters:
wcChar: character to search
Returns:
Pointer to the last character wcChar or NULL if no such character is found
const wchar_t * TString::getPtrOfLastStr ( const IString rSubString ) const

returns the pointer of the last occurence of a substring

Parameters:
rSubString: substring to search
Returns:
Pointer to the last substring or NULL if no such substring is found
const wchar_t * zeus::TString::getPtrOfLastStr ( const TString rSubString ) const [inline]
const wchar_t * zeus::TString::getPtrOfStr ( Int  iStartIndex,
const TString rSubString 
) const [inline]
const wchar_t * TString::getPtrOfStr ( Int  iStartIndex,
const IString rSubString 
) const

returns the pointer of the nextx occurence of a substring after the start index

Parameters:
iStartIndex: index to start at
rSubString: substring to search
Returns:
Pointer to the first substring or NULL if no such substring is found
TString zeus::TString::getRight ( Int  iCharCount ) const [inline]

This method returns the right substring (begins at index size- iCharCount to size-1

Parameters:
iCharCount: number of characters
Returns:
sub string
See also:
TString::getSubString
Int MQUALIFIER zeus::TString::getSize (  ) const [inline, virtual]
See also:
IString::getSize

Implements zeus::IString.

TString TString::getSubString ( Int  iStartIndex,
Int  iEndIndex = IntMax 
) const

Ermitteln des Substring

Parameters:
iStartIndex: Start index
iEndIndex: end index
Returns:
substring
Int TString::getSubStringCount ( const IString rSubstring ) const

This method counts the substrings of this string

Parameters:
rSubstring: Substring
Returns:
number of times this substring occures in this string
TString TString::insert ( Int  iIndex,
const IString rStrToInsert 
) const

inserts a string at the position index and returns the new string

Parameters:
iIndex: position index to insert the string
rStrToInsert: String to insert
Returns:
new string
TString zeus::TString::insert ( Int  iIndex,
const TString rStrToInsert 
) const [inline]

inserts a string at the position index and returns the new string

Parameters:
iIndex: position index to insert the string
rStrToInsert: String to insert
Returns:
new string
bool MQUALIFIER zeus::TString::isBool (  ) const [inline, virtual]
See also:
IString::isBool

Implements zeus::IString.

bool MQUALIFIER zeus::TString::isEmpty (  ) const [inline, virtual]
See also:
IString::isEmpty

Implements zeus::IString.

bool MQUALIFIER zeus::TString::isFloat (  ) const [inline, virtual]
See also:
IString::isFloat

Implements zeus::IString.

bool MQUALIFIER zeus::TString::isInt (  ) const [inline, virtual]
See also:
IString::isInt

Implements zeus::IString.

bool zeus::TString::operator!= ( const unsigned int  uiData ) const [inline]

Checks if the string is not equal to an unsigned int value

Parameters:
uiData: value to check
bool zeus::TString::operator!= ( const TString rInstr ) const [inline]

Vergleichsoperator. Der wchar_t-Array wird mit dem des Objekts verglichen.

Parameters:
rInstr: zu vergleichendes Stringobjekt
bool zeus::TString::operator!= ( const IString rInstr ) const [inline]

Vergleichsoperator. Der wchar_t-Array wird mit dem des Objekts verglichen.

Parameters:
rInstr: zu vergleichendes Stringobjekt
bool zeus::TString::operator!= ( const wchar_t *  pInbuffer ) const [inline]

Vergleichsoperator. Der wchar_t-Array wird mit dem des Objekts verglichen.

Parameters:
pInbuffer: zu vergleichendes Stringobjekt
bool zeus::TString::operator!= ( const IString pInstr ) const [inline]

Vergleichsoperator fuer IString*.

Parameters:
pInstr: Zeiger auf zu vergleichendes Stringobjekt
bool zeus::TString::operator!= ( const char *  pInbuffer ) const [inline]

Vergleichsoperator. Der char-Array wird mit dem des Objekts verglichen.

Parameters:
pInbuffer: zu vergleichendes Stringobjekt
bool zeus::TString::operator!= ( const Float  fData ) const [inline]

Vergleichsoperator: Der einen float Wert mit dem String vergleicht

Parameters:
fData: Zuweisungsparameter
bool zeus::TString::operator!= ( const Int  iData ) const [inline]

Checks if the string is not equal to an int value

Parameters:
iData: value to check
bool zeus::TString::operator!= ( const int  iData ) const [inline]

Checks if the string is not equal to an int value

Parameters:
iData: value to check
bool zeus::TString::operator!= ( const Uint  uiData ) const [inline]

Checks if the string is not equal to an unsigned int value

Parameters:
uiData: value to check
bool zeus::TString::operator!= ( const bool  bData ) const [inline]

Negation of operator==.

TString zeus::TString::operator+ ( const TString rInstr ) const [inline]

Hinzufuegen eines Strings

Parameters:
rInstr: Stringobjekt
TString zeus::TString::operator+ ( const IString rInstr ) const [inline]

Hinzufuegen eines Strings

Parameters:
rInstr: Stringobjekt
TString zeus::TString::operator+ ( const wchar_t *  pInbuffer ) const [inline]

Hinzufuegen eines wchar_t-Arrays

Parameters:
pInbuffer: wchar_t Buffer welcher hinzugefuegt wird
TString zeus::TString::operator+ ( const char *  pInbuffer ) const [inline]

Hinzufuegen eines char-Arrays

Parameters:
pInbuffer: char Buffer welcher hinzugefuegt wird
TString zeus::TString::operator+ ( const wchar_t  wc ) const [inline]

adds a wide character

Parameters:
wc: char to add
TString zeus::TString::operator+ ( const char  c ) const [inline]

adds a character

Parameters:
c: char to add
TString zeus::TString::operator+ ( const Int  iInval ) const [inline]

adds an int value to the string

Parameters:
iInval: Value to add
TString zeus::TString::operator+ ( const int  iInval ) const [inline]

adds an int value to the string

Parameters:
iInval: Value to add
TString zeus::TString::operator+ ( const Uint  uiInval ) const [inline]

adds an unsigned int value to the string

Parameters:
uiInval: Value to add
TString zeus::TString::operator+ ( const Float  fInval ) const [inline]

Hinzufuegen eines float-Values

Parameters:
fInval: float-Value
TString zeus::TString::operator+ ( const unsigned int  uiInval ) const [inline]

adds an unsigned int value to the string

Parameters:
uiInval: Value to add
TString & zeus::TString::operator+= ( const TString rInstr ) [inline]

Concats a string with an other string

Parameters:
rInstr: string to concatenate
Returns:
this
TString & zeus::TString::operator+= ( const int  iInval ) [inline]

Concats a string with a int value

Parameters:
iInval: value
Returns:
this
TString & zeus::TString::operator+= ( const Uint  uiInval ) [inline]

Concats a string with a unsigned Int value

Parameters:
uiInval: value
Returns:
this
TString & zeus::TString::operator+= ( const char  c ) [inline]

Concats this string with a (1 byte) char.

Parameters:
c[IN]: Char.
Returns:
this.
TString & zeus::TString::operator+= ( const unsigned int  uiInval ) [inline]

Concats a string with a unsigned int value

Parameters:
uiInval: value
Returns:
this
TString & zeus::TString::operator+= ( const Int  iInval ) [inline]

Concats a string with a int value

Parameters:
iInval: value
Returns:
this
TString & zeus::TString::operator+= ( const Float  fInval ) [inline]

Concats a string with a float value

Parameters:
fInval: value
Returns:
this
TString & zeus::TString::operator+= ( const IString rInstr ) [inline]

Concats a string with an other string

Parameters:
rInstr: string to concatenate
Returns:
this
TString & zeus::TString::operator+= ( const wchar_t *  pInbuffer ) [inline]

Concats a string with a wide char buffer

Parameters:
pInbuffer: buffer
Returns:
this
TString & zeus::TString::operator+= ( const wchar_t  wc ) [inline]

Concats this string with a wide char.

Parameters:
wc[IN]: Wide char
Returns:
this.
TString & zeus::TString::operator+= ( const char *  pInbuffer ) [inline]

Concats a string with a char buffer

Parameters:
pInbuffer: buffer
Returns:
this
bool zeus::TString::operator< ( const TString rInStr ) const [inline]

compares lexicographically two strings and returns true if the this is smaller than the parameter rInStr.

Parameters:
rInStr: String to compare
Return values:
true: this is smaller
false: else
bool zeus::TString::operator<= ( const TString rInStr ) const [inline]

compares lexicographically two strings and returns true if the this is smaller than or equals the parameter rInStr.

Parameters:
rInStr: String to compare
Return values:
true: this is smaller or equal
false: else
TString & zeus::TString::operator= ( const wchar_t *  pData ) [inline]

Copy operator. A wide array is copied into this string object

Parameters:
pData: wide array to copy
TString & zeus::TString::operator= ( const int  iData ) [inline]

This assigns a int value to the string object

Parameters:
iData: Value to assign
TString & zeus::TString::operator= ( const Int  iData ) [inline]

This assigns a int value to the string object

Parameters:
iData: Value to assign
TString & zeus::TString::operator= ( const Uint  uiData ) [inline]

This assigns a unsigned int value to the string object

Parameters:
uiData: Value to assign
TString & zeus::TString::operator= ( const unsigned int  uiData ) [inline]

This assigns a unsigned int value to the string object

Parameters:
uiData: Value to assign
TString & zeus::TString::operator= ( const Float  fData ) [inline]

This assigns a float value to the string object

Parameters:
fData: Value to assign
TString & zeus::TString::operator= ( const char *  pData ) [inline]

This assigns a 8bit array to the string object

Parameters:
pData: array to assign
TString & zeus::TString::operator= ( bool  bData ) [inline]

This assigns a boolean value to the string object

Parameters:
bData: boolean value to assign
TString & zeus::TString::operator= ( const TString rInstr ) [inline]

Copy operator. An other string is copied into this string object

Parameters:
rInstr: object to copy
TString & zeus::TString::operator= ( const IString rInstr ) [inline]

Copy operator. An other string is copied into this string object

Parameters:
rInstr: object to copy
TString & zeus::TString::operator= ( const IString pInstr ) [inline]

Assignment operator. Another string is copied into this string object

Parameters:
pInstr: Pointer to object to assign
bool zeus::TString::operator== ( bool  bData ) const [inline]

Check the equality to a boolean value.

Parameters:
bData: boolean value for comparison.
bool zeus::TString::operator== ( const char *  inbuffer ) const [inline]

Vergleichsoperator. Der char-Array wird mit dem des Objekts verglichen.

Parameters:
inbuffer: zu vergleichendes Stringobjekt
bool zeus::TString::operator== ( const Int  iData ) const [inline]

equals operator check if the string is equal to an int

Parameters:
iData: value to check
bool zeus::TString::operator== ( const Float  fData ) const [inline]

Vergleichsoperator: Der einen double Wert mit dem String vergleicht

Parameters:
fData: Zuweisungsparameter
bool zeus::TString::operator== ( const Uint  uiData ) const [inline]

equals operator check if the string is equal to an unsigned int

Parameters:
uiData: value to check
bool zeus::TString::operator== ( const TString rInstr ) const [inline]

Vergleichsoperator. Der wchar_t-Array wird mit dem des Objekts verglichen.

Parameters:
rInstr: zu vergleichendes Stringobjekt
bool zeus::TString::operator== ( const IString rInstr ) const [inline]

Vergleichsoperator. Der wchar_t-Array wird mit dem des Objekts verglichen.

Parameters:
rInstr: zu vergleichendes Stringobjekt
bool zeus::TString::operator== ( const wchar_t *  pInbuffer ) const [inline]

Vergleichsoperator. Der wchar_t-Array wird mit dem des Objekts verglichen.

Parameters:
pInbuffer: zu vergleichendes Stringobjekt
bool zeus::TString::operator== ( const unsigned int  uiData ) const [inline]

equals operator check if the string is equal to an unsigned int

Parameters:
uiData: value to check
bool zeus::TString::operator== ( const IString pInstr ) const [inline]

Vergleichsoperator fuer IString*.

Parameters:
pInstr: Zeiger auf zu vergleichendes Stringobjekt
bool zeus::TString::operator== ( const int  iData ) const [inline]

equals operator check if the string is equal to an int

Parameters:
iData: value to check
bool zeus::TString::operator> ( const TString rInStr ) const [inline]

compares lexicographically two strings and returns true if the this is bigger than the parameter rInStr.

Parameters:
rInStr: String to compare
Return values:
true: this is bigger
false: else
bool zeus::TString::operator>= ( const TString rInStr ) const [inline]

compares lexicographically two strings and returns true if the this is bigger than or equals the parameter rInStr.

Parameters:
rInStr: String to compare
Return values:
true: this is bigger or equal
false: else
wchar_t & zeus::TString::operator[] ( Int  iIndex ) [inline]

Klammeroperator: Zugriff auf ein bestimmtes Character im String

Parameters:
iIndex: Zuweisungsparameter
Returns:
character an dieser Position
TString zeus::TString::remove ( const TString rToRemove,
Int *  pReplaces = NULL 
) const [inline]

This method removes all substrings from this string and returns the new string

Parameters:
rToRemove: Substring to remove
pReplaces: If pointer is valid, the number of replaces are returned
Returns:
new string
TString zeus::TString::remove ( const IString rToRemove,
Int *  pReplaces = NULL 
) const [inline]

This method removes all substrings from this string and returns the new string

Parameters:
rToRemove: Substring to remove
pReplaces: If pointer is valid, the number of replaces are returned
Returns:
new string
TString zeus::TString::removeFirst ( const IString rToRemove ) const [inline]

This method removes the first substrings found from this string and returns the new string

Parameters:
rToRemove: Substring to remove
Returns:
new string
TString zeus::TString::removeFirst ( const TString rToRemove ) const [inline]

This method removes the first substrings found from this string and returns the new string

Parameters:
rToRemove: Substring to remove
Returns:
new string
TString TString::replace ( const IString rToRemove,
const IString rReplace,
Int *  pReplaces = NULL 
) const

This method works like replace() but it will replace all substrings inside this string.

Parameters:
rToRemove: Substring to remove
rReplace: String for replacing
pReplaces: If pointer is valid, the number of replaces are returned
Returns:
new string
TString zeus::TString::replace ( const TString rToRemove,
const TString rReplace,
Int *  pReplaces = NULL 
) const [inline]

This method works like replace() but it will replace all substrings inside this string.

Parameters:
rToRemove: Substring to remove
rReplace: String for replacing
pReplaces: If pointer is valid, the number of replaces are returned
Returns:
new string
TString TString::replaceFirst ( const IString rToRemove,
const IString rReplace 
) const

This method replaces a substring with a new string. It can also be used just for removing a substring by calling this method with an empty strReplace variable.

Parameters:
rToRemove: Substring to remove
rReplace: String for replaceing
Returns:
new string
TString zeus::TString::replaceFirst ( const TString rToRemove,
const TString rReplace 
) const [inline]

This method replaces the first substring with a new string. It might be used just for removing a substring by calling this method with an empty strReplace variable.

Parameters:
rToRemove: Substring to remove
rReplace: String for replaceing
Returns:
new string
bool MQUALIFIER zeus::TString::startsWith ( const wchar_t *  pString ) const [inline, virtual]
See also:
IString::startsWith

Implements zeus::IString.

bool MQUALIFIER TString::startsWithStr ( const IString rString ) const [virtual]
See also:
IString::startsWithStr

Implements zeus::IString.

TString zeus::TString::terminated ( const IString rTermination ) const [inline]

Returns a string terminated by strTermination, but does not add the termination if it already exists.

Parameters:
rTermination: String must end with this substring
Returns:
new string
TString zeus::TString::terminated ( const TString rTermination ) const [inline]

Overload the method terminated() for TString.

Parameters:
rTermination: string used to terminate
Returns:
new string
bool MQUALIFIER TString::toBool ( bool  bPredef = false,
bool *  pbError = NULL 
) const [virtual]
See also:
IString::toBool

Implements zeus::IString.

Float MQUALIFIER TString::toFloat ( Float  fPredef = 0.0,
bool *  pbError = NULL 
) const [virtual]
See also:
IString::toFloat
Int MQUALIFIER TString::toInt ( Int  iPredef = 0,
bool *  pbError = NULL 
) const [virtual]
See also:
IString::toInt
TString TString::toLowerCase (  ) const

Converts the string content to lower case letters

Returns:
converted string
Timeval MQUALIFIER TString::toTimeval ( Timeval  tmPredef = 0,
bool *  pbError = NULL 
) const [virtual]
See also:
IString::toTimeval

Implements zeus::IString.

Uint MQUALIFIER TString::toUint ( Uint  uiPredef = 0,
bool *  pbError = NULL 
) const [virtual]
See also:
IString::toUint

Implements zeus::IString.

TString TString::toUpperCase (  ) const

Converts the string content to upper case letters

Returns:
converted string
TString TString::transcode ( const IByteArray rList ) [static]

Converts a array of bytes to a string

Parameters:
rList: Byte array to convert into a string
Returns:
Converted string data
Note:
The byte array might contain simple character data or 16bit UNICODE data. If UNICODE data is stored the header 0xFFFE is needed (1st and 2nd byte).
TByteArray TString::transcode ( const IString rValue,
bool  bAsWideChar,
bool  bNullTerminated = true 
) [static]

Converts a string into a array of bytes

Parameters:
rValue: String value to convert into a byte array
bAsWideChar: Flag if the byte array will represent the ISO or UNICODE data of the string. True means UNICODE.
bNullTerminated: Flag if the null termination should be added to the byte array (default = true)
Returns:
Byte array
Note:
The TString::transcode() method does only support the 2 Byte data of UNICODE. This will convert the wchar_t-Data if the sizeof(wchar_t) is bigger than 2 Bytes.
TByteArray zeus::TString::transcode ( const TString rValue,
bool  bAsWideChar,
bool  bNullTerminated = true 
) [inline, static]

Converts a string into a array of bytes

Parameters:
rValue: string to transform
bAsWideChar: adds wide characters into the array
bNullTerminated: Flag if the null termination should be added to the byte array (default = true)
Returns:
byte array
TString zeus::TString::trim (  ) const [inline]

This method trims the string. All leading or ending white spaces are removed.

Returns:
trimmed string
TString TString::trimExt ( const IString rSource,
const IString rChars,
bool  bLeft = true,
bool  bRight = true 
) [static]

This method trims the string. All leading or ending characters listed in parameter rChars are removed

Parameters:
rSource: Source string
rChars: List of characters to remove
bLeft: Flag if the left side must be trimmed
bRight: Flag if the right side must be trimmed
Returns:
trimmed string
TString zeus::TString::trimLeft (  ) const [inline]

This method trims the string. All leading white spaces are removed.

Returns:
trimmed string
TString zeus::TString::trimRight (  ) const [inline]

This method trims the string. All ending white spaces are removed.

Returns:
trimmed string

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


Written by Benjamin Hadorn http://www.xatlantis.ch.
Last change made on Sun Jan 22 2012 15:28:40