CFx SDK Documentation  2020SP3
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
CFxString Class Reference

#include <FxString.h>

Public Member Functions

 CFxString ()
 
 CFxString (const CFxString &stringSrc)
 
 CFxString (const OdString &stringSrc)
 
 CFxString (const OdString &stringSrc, unsigned int codePage)
 
 CFxString (const QString &stringSrc)
 
 CFxString (const QString &stringSrc, unsigned int codePage)
 
 CFxString (const Wt::WString &stringSrc)
 
 CFxString (const Wt::WString &stringSrc, unsigned int codePage)
 
 CFxString (const OdAnsiString &stringSrc)
 
 CFxString (const OdAnsiString &stringSrc, unsigned int codePage)
 
 CFxString (char ch, int nRepeat)
 
 CFxString (char ch, int nRepeat, unsigned int codePage)
 
 CFxString (OdChar ch, int nRepeat)
 
 CFxString (OdChar ch, int nRepeat, unsigned int codePage)
 
 CFxString (const OdChar *lpsz)
 
 CFxString (const OdChar *lpsz, unsigned int codePage)
 
 ~CFxString ()
 
int getAllocLength () const
 
int getLength () const
 
bool isNull () const
 
bool isEmpty () const
 
void empty ()
 
char getAtA (int nIndex) const
 
OdChar getAtWU (int nIndex) const
 
void setAtA (int nIndex, char ch)
 
void setAtW (int nIndex, OdChar ch)
 
const char * ansi_str () const
 
CFxAnsiStringClass utf8_str () const
 
const OdCharwide_strU () const
 
 operator const wchar_t * () const
 
 operator OdString () const
 
 operator const QString & () const
 
 operator const Wt::WString & () const
 
const CFxStringoperator= (const CFxString &stringSrc)
 
const CFxStringoperator= (const OdAnsiString &stringSrc)
 
const CFxStringoperator= (const OdString &stringSrc)
 
const CFxStringoperator= (char ch)
 
const CFxStringoperator= (OdChar ch)
 
const CFxStringoperator= (const char *lpsz)
 
const CFxStringoperator= (const OdChar *lpsz)
 
const CFxStringoperator+= (const CFxString &stringSrc)
 
const CFxStringoperator+= (char ch)
 
const CFxStringoperator+= (OdChar ch)
 
const CFxStringoperator+= (const char *lpsz)
 
const CFxStringoperator+= (const OdChar *lpsz)
 
const CFxStringoperator+= (const OdString &str)
 
int compareA (const char *lpsz) const
 
int compare (const OdChar *lpsz) const
 
int compare (const CFxString &lpsz) const
 
int compareNoCaseA (const char *lpsz) const
 
int compareNoCase (const OdChar *lpsz) const
 
int compareNoCase (const CFxString &stringSrc) const
 
bool equalNoCase (const OdChar *lpsz) const
 
bool equalNoCase (const CFxString &stringSrc) const
 
bool startsWith (const OdChar *s) const
 
bool startsWith (const char *s) const
 
bool startsWith (const OdChar &c) const
 
bool startsWith (const char &c) const
 
bool startsWithNoCase (const OdChar *s) const
 
bool startsWithNoCase (const char *s) const
 
bool startsWithNoCase (const OdChar &c) const
 
bool startsWithNoCase (const char &c) const
 
CFxString mid (int nFirst, int nCount) const
 
CFxString mid (int nFirst) const
 
CFxString left (int nCount) const
 
CFxString right (int nCount) const
 
CFxString spanIncludingA (const char *lpszCharSet) const
 
CFxString spanIncluding (const OdChar *lpszCharSet) const
 
CFxString spanExcludingA (const char *lpszCharSet) const
 
CFxString spanExcluding (const OdChar *lpszCharSet) const
 
CFxStringmakeUpper ()
 
CFxStringmakeLower ()
 
CFxStringmakeReverse ()
 
CFxStringtrimRight ()
 
CFxStringtrimLeft ()
 
CFxStringtrimRightA (char chTarget)
 
CFxStringtrimRightW (OdChar chTarget)
 
CFxStringtrimRightA (const char *lpszTargets)
 
CFxStringtrimRight (const OdChar *lpszTargets)
 
CFxStringtrimLeftA (char chTarget)
 
CFxStringtrimLeftW (OdChar chTarget)
 
CFxStringtrimLeftA (const char *lpszTargets)
 
CFxStringtrimLeft (const OdChar *lpszTargets)
 
CFxStringreplaceA (char chOld, char chNew)
 
CFxStringreplaceW (OdChar chOld, OdChar chNew)
 
CFxStringreplaceA (const char *lpszOld, const char *lpszNew)
 
CFxStringreplace (const OdChar *lpszOld, const OdChar *lpszNew)
 
int removeA (char chRemove)
 
int removeW (OdChar chRemove)
 
int insertA (int nIndex, char ch)
 
int insertW (int nIndex, OdChar ch)
 
int insertA (int nIndex, const char *pstr)
 
int insert (int nIndex, const OdChar *pstr)
 
int deleteChars (int nIndex, int nCount=1)
 
int findA (char ch) const
 
int findW (OdChar ch) const
 
int reverseFindA (char ch) const
 
int reverseFindW (OdChar ch) const
 
int findA (char ch, int nStart) const
 
int findW (OdChar ch, int nStart) const
 
int findOneOfA (const char *lpszCharSet) const
 
int findOneOf (const OdChar *lpszCharSet) const
 
int find (const CFxString &) const
 
int findA (const char *lpszSub) const
 
int find (const OdChar *lpszSub) const
 
int findA (const char *lpszSub, int nStart) const
 
int find (const OdChar *lpszSub, int nStart) const
 
CFxStringformat (const OdChar *lpszFormat,...)
 
CFxStringformatA (const char *lpszFormat,...)
 
CFxStringformat (const OdChar *lpszFormat, const OdString &str)
 
CFxStringvformatA (const char *lpszFormat, va_list argList)
 
CFxStringvformat (const OdChar *lpszFormat, va_list argList)
 
unsigned int GetCodePage () const
 
void SetCodePage (unsigned int codePage)
 
CFxStringArray SplitA (char separator) const
 
CFxStringArray SplitW (OdChar separator) const
 
OdCodePageId GetCadCodePage (unsigned int codePage) const
 
bool EncodeHTML ()
 
bool DecodeHTML ()
 
CFxString arg (long long a, int fieldwidth=0, int base=10, unsigned short fillChar=' ') const
 
CFxString arg (unsigned long long a, int fieldwidth=0, int base=10, unsigned short fillChar=' ') const
 
CFxString arg (long a, int fieldwidth=0, int base=10, unsigned short fillChar=' ') const
 
CFxString arg (unsigned long a, int fieldwidth=0, int base=10, unsigned short fillChar=' ') const
 
CFxString arg (int a, int fieldWidth=0, int base=10, unsigned short fillChar=' ') const
 
CFxString arg (unsigned int a, int fieldWidth=0, int base=10, unsigned short fillChar=' ') const
 
CFxString arg (short a, int fieldWidth=0, int base=10, unsigned short fillChar=' ') const
 
CFxString arg (unsigned short a, int fieldWidth=0, int base=10, unsigned short fillChar=' ') const
 
CFxString arg (double a, int fieldWidth=0, char fmt='g', int prec=-1, unsigned short fillChar=' ') const
 
CFxString arg (char a, int fieldWidth=0, unsigned short fillChar=' ') const
 
CFxString arg (const CFxString &a, int fieldWidth=0, unsigned short fillChar=' ') const
 
CFxString arg (const CFxString &a1, const CFxString &a2) const
 
CFxString arg (const CFxString &a1, const CFxString &a2, const CFxString &a3) const
 
CFxString arg (const CFxString &a1, const CFxString &a2, const CFxString &a3, const CFxString &a4) const
 
CFxString arg (const CFxString &a1, const CFxString &a2, const CFxString &a3, const CFxString &a4, const CFxString &a5) const
 
CFxString arg (const CFxString &a1, const CFxString &a2, const CFxString &a3, const CFxString &a4, const CFxString &a5, const CFxString &a6) const
 
CFxString arg (const CFxString &a1, const CFxString &a2, const CFxString &a3, const CFxString &a4, const CFxString &a5, const CFxString &a6, const CFxString &a7) const
 
CFxString arg (const CFxString &a1, const CFxString &a2, const CFxString &a3, const CFxString &a4, const CFxString &a5, const CFxString &a6, const CFxString &a7, const CFxString &a8) const
 
CFxString arg (const CFxString &a1, const CFxString &a2, const CFxString &a3, const CFxString &a4, const CFxString &a5, const CFxString &a6, const CFxString &a7, const CFxString &a8, const CFxString &a9) const
 
CFxString multiArg (int numArgs, const CFxString **args) const
 

Static Public Member Functions

static CFxString from_ansi_str (const char *data)
 
static CFxString from_ansi_str (const CFxAnsiStringClass &data)
 
static CFxString from_utf8_str (const char *data)
 
static CFxString from_utf8_str (const CFxAnsiStringClass &data)
 

Protected Member Functions

 CFxString (const char *lpch, int nLength)
 
 CFxString (const char *lpch, int nLength, unsigned int codePage)
 
 CFxString (const OdChar *lpch, int nLength)
 
 CFxString (const OdChar *lpch, int nLength, unsigned int codePage)
 

Protected Attributes

CFxStringPrivatem_private
 

Friends

class CFxStringPrivate
 
DDKERNEL_API CFxString operator+ (const CFxString &string1, const CFxString &string2)
 
DDKERNEL_API CFxString operator+ (const CFxString &stringSrc, char ch)
 
DDKERNEL_API CFxString operator+ (const CFxString &stringSrc, OdChar ch)
 
DDKERNEL_API CFxString operator+ (OdChar ch, const CFxString &stringSrc)
 
DDKERNEL_API CFxString operator+ (const CFxString &stringSrc, const char *lpsz)
 
DDKERNEL_API CFxString operator+ (const CFxString &stringSrc, const OdChar *lpsz)
 
DDKERNEL_API CFxString operator+ (const OdChar *lpsz, const CFxString &stringSrc)
 

Detailed Description

Description: Represents a string. Remarks: FxString objects use zero-based indices to access string elements. Library: DDKERNEL

Definition at line 47 of file FxString.h.

Constructor & Destructor Documentation

◆ CFxString() [1/20]

CFxString::CFxString ( )

Constructor. This FxString will be created with CP_ACP codePage code page type.

◆ CFxString() [2/20]

CFxString::CFxString ( const CFxString stringSrc)

Constructor of copy.

◆ CFxString() [3/20]

CFxString::CFxString ( const OdString stringSrc)

Constructor. This FxString will receive a copy of the OdString.

◆ CFxString() [4/20]

CFxString::CFxString ( const OdString stringSrc,
unsigned int  codePage 
)

◆ CFxString() [5/20]

CFxString::CFxString ( const QString &  stringSrc)

Constructor. This FxString will receive a copy of the QString.

◆ CFxString() [6/20]

CFxString::CFxString ( const QString &  stringSrc,
unsigned int  codePage 
)

◆ CFxString() [7/20]

CFxString::CFxString ( const Wt::WString &  stringSrc)

Constructor. This FxString will receive a copy of the QString.

◆ CFxString() [8/20]

CFxString::CFxString ( const Wt::WString &  stringSrc,
unsigned int  codePage 
)

◆ CFxString() [9/20]

CFxString::CFxString ( const OdAnsiString &  stringSrc)

Constructor. This FxString will receive a copy of the OdWString.

◆ CFxString() [10/20]

CFxString::CFxString ( const OdAnsiString &  stringSrc,
unsigned int  codePage 
)

◆ CFxString() [11/20]

CFxString::CFxString ( char  ch,
int  nRepeat 
)

Constructor. Initialize this string to a sequence of nRepeat instances of the character ch.

◆ CFxString() [12/20]

CFxString::CFxString ( char  ch,
int  nRepeat,
unsigned int  codePage 
)

◆ CFxString() [13/20]

CFxString::CFxString ( OdChar  ch,
int  nRepeat 
)

Constructor. This FxString will receive a copy of the character string referenced by lpsz. Constructor. Initialize this string to a sequence of nRepeat instances of the character ch.

◆ CFxString() [14/20]

CFxString::CFxString ( OdChar  ch,
int  nRepeat,
unsigned int  codePage 
)

◆ CFxString() [15/20]

CFxString::CFxString ( const OdChar lpsz)

Constructor. This FxString will receive a copy of the character string referenced by lpsz.

◆ CFxString() [16/20]

CFxString::CFxString ( const OdChar lpsz,
unsigned int  codePage 
)

◆ ~CFxString()

CFxString::~CFxString ( )

Destructor.

◆ CFxString() [17/20]

CFxString::CFxString ( const char *  lpch,
int  nLength 
)
protected

Constructor. This FxString will receive a copy of the first nLength characters of the string referenced by lpch.

◆ CFxString() [18/20]

CFxString::CFxString ( const char *  lpch,
int  nLength,
unsigned int  codePage 
)
protected

◆ CFxString() [19/20]

CFxString::CFxString ( const OdChar lpch,
int  nLength 
)
protected

Constructor. This FxString will receive a copy of the first nLength characters of the string referenced by lpch.

◆ CFxString() [20/20]

CFxString::CFxString ( const OdChar lpch,
int  nLength,
unsigned int  codePage 
)
protected

Member Function Documentation

◆ ansi_str()

const char* CFxString::ansi_str ( ) const

Returns a const pointer to the underlying ASCII char array referenced by this FxString.

◆ arg() [1/19]

CFxString CFxString::arg ( char  a,
int  fieldWidth = 0,
unsigned short  fillChar = ' ' 
) const

◆ arg() [2/19]

CFxString CFxString::arg ( const CFxString a,
int  fieldWidth = 0,
unsigned short  fillChar = ' ' 
) const

◆ arg() [3/19]

CFxString CFxString::arg ( const CFxString a1,
const CFxString a2 
) const
inline

Definition at line 1099 of file FxString.h.

◆ arg() [4/19]

CFxString CFxString::arg ( const CFxString a1,
const CFxString a2,
const CFxString a3 
) const
inline

Definition at line 1101 of file FxString.h.

◆ arg() [5/19]

CFxString CFxString::arg ( const CFxString a1,
const CFxString a2,
const CFxString a3,
const CFxString a4 
) const
inline

Definition at line 1103 of file FxString.h.

◆ arg() [6/19]

CFxString CFxString::arg ( const CFxString a1,
const CFxString a2,
const CFxString a3,
const CFxString a4,
const CFxString a5 
) const
inline

Definition at line 1106 of file FxString.h.

◆ arg() [7/19]

CFxString CFxString::arg ( const CFxString a1,
const CFxString a2,
const CFxString a3,
const CFxString a4,
const CFxString a5,
const CFxString a6 
) const
inline

Definition at line 1109 of file FxString.h.

◆ arg() [8/19]

CFxString CFxString::arg ( const CFxString a1,
const CFxString a2,
const CFxString a3,
const CFxString a4,
const CFxString a5,
const CFxString a6,
const CFxString a7 
) const
inline

Definition at line 1112 of file FxString.h.

◆ arg() [9/19]

CFxString CFxString::arg ( const CFxString a1,
const CFxString a2,
const CFxString a3,
const CFxString a4,
const CFxString a5,
const CFxString a6,
const CFxString a7,
const CFxString a8 
) const
inline

Definition at line 1116 of file FxString.h.

◆ arg() [10/19]

CFxString CFxString::arg ( const CFxString a1,
const CFxString a2,
const CFxString a3,
const CFxString a4,
const CFxString a5,
const CFxString a6,
const CFxString a7,
const CFxString a8,
const CFxString a9 
) const
inline

Definition at line 1120 of file FxString.h.

◆ arg() [11/19]

CFxString CFxString::arg ( double  a,
int  fieldWidth = 0,
char  fmt = 'g',
int  prec = -1,
unsigned short  fillChar = ' ' 
) const

◆ arg() [12/19]

CFxString CFxString::arg ( int  a,
int  fieldWidth = 0,
int  base = 10,
unsigned short  fillChar = ' ' 
) const
inline

Definition at line 1087 of file FxString.h.

◆ arg() [13/19]

CFxString CFxString::arg ( long  a,
int  fieldwidth = 0,
int  base = 10,
unsigned short  fillChar = ' ' 
) const
inline

Definition at line 1091 of file FxString.h.

◆ arg() [14/19]

CFxString CFxString::arg ( long long  a,
int  fieldwidth = 0,
int  base = 10,
unsigned short  fillChar = ' ' 
) const

◆ arg() [15/19]

CFxString CFxString::arg ( short  a,
int  fieldWidth = 0,
int  base = 10,
unsigned short  fillChar = ' ' 
) const
inline

Definition at line 1095 of file FxString.h.

◆ arg() [16/19]

CFxString CFxString::arg ( unsigned int  a,
int  fieldWidth = 0,
int  base = 10,
unsigned short  fillChar = ' ' 
) const
inline

Definition at line 1089 of file FxString.h.

◆ arg() [17/19]

CFxString CFxString::arg ( unsigned long  a,
int  fieldwidth = 0,
int  base = 10,
unsigned short  fillChar = ' ' 
) const
inline

Definition at line 1093 of file FxString.h.

◆ arg() [18/19]

CFxString CFxString::arg ( unsigned long long  a,
int  fieldwidth = 0,
int  base = 10,
unsigned short  fillChar = ' ' 
) const

◆ arg() [19/19]

CFxString CFxString::arg ( unsigned short  a,
int  fieldWidth = 0,
int  base = 10,
unsigned short  fillChar = ' ' 
) const
inline

Definition at line 1097 of file FxString.h.

◆ compare() [1/2]

int CFxString::compare ( const CFxString lpsz) const

◆ compare() [2/2]

int CFxString::compare ( const OdChar lpsz) const

Case sensitive string comparison. Returns < 0 if this FxString is < lpsz, 0 if the 2 strings are identical (case sensitive), or > 0 if this FxString is > lpsz.

◆ compareA()

int CFxString::compareA ( const char *  lpsz) const

Case sensitive string comparison. Returns < 0 if this FxString is < lpsz, 0 if the 2 strings are identical (case sensitive), or > 0 if this FxString is > lpsz.

◆ compareNoCase() [1/2]

int CFxString::compareNoCase ( const CFxString stringSrc) const

Description:

◆ compareNoCase() [2/2]

int CFxString::compareNoCase ( const OdChar lpsz) const

Description:

◆ compareNoCaseA()

int CFxString::compareNoCaseA ( const char *  lpsz) const

Description:

◆ DecodeHTML()

bool CFxString::DecodeHTML ( )

◆ deleteChars()

int CFxString::deleteChars ( int  nIndex,
int  nCount = 1 
)

Description: Deletes nCount characters from this string, starting at index nIndex.

Return Value: The new length of this string.

◆ empty()

void CFxString::empty ( )

Clears the contents of this string, setting its contents to the empty string (length 0).

◆ EncodeHTML()

bool CFxString::EncodeHTML ( )

◆ equalNoCase() [1/2]

bool CFxString::equalNoCase ( const CFxString stringSrc) const

return true if strings are equal (case insensitive)

◆ equalNoCase() [2/2]

bool CFxString::equalNoCase ( const OdChar lpsz) const

return true if strings are equal (case insensitive)

◆ find() [1/3]

int CFxString::find ( const CFxString ) const

Description: Finds the first occurrence of the string lpszSub in this FxString.

Return Value: The index of the first occurrence of lpszSub, otherwise -1 if not found.

◆ find() [2/3]

int CFxString::find ( const OdChar lpszSub) const

Description: Finds the first occurrence of the string lpszSub in this FxString.

Return Value: The index of the first occurrence of lpszSub, otherwise -1 if not found.

◆ find() [3/3]

int CFxString::find ( const OdChar lpszSub,
int  nStart 
) const

Description: Finds the first occurrence of the string lpszSub in this FxString, starting from index nStart.

Return Value: The index of the first occurrence of lpszSub starting from nStart, otherwise -1 if not found.

◆ findA() [1/4]

int CFxString::findA ( char  ch) const

Description: Finds the first occurrence of the specified character in this string, starting from the beginning.

Return Value: Index of first occurrence of ch in this string, otherwise -1 if ch is not found.

◆ findA() [2/4]

int CFxString::findA ( char  ch,
int  nStart 
) const

Description: Finds the first occurrence of the specified character in this string, starting from index nStart.

Return Value: Index of first occurrence of ch on or after nStart, otherwise -1 if ch is not found.

◆ findA() [3/4]

int CFxString::findA ( const char *  lpszSub) const

Description: Finds the first occurrence of the string lpszSub in this FxString.

Return Value: The index of the first occurrence of lpszSub, otherwise -1 if not found.

◆ findA() [4/4]

int CFxString::findA ( const char *  lpszSub,
int  nStart 
) const

Description: Finds the first occurrence of the string lpszSub in this FxString, starting from index nStart.

Return Value: The index of the first occurrence of lpszSub starting from nStart, otherwise -1 if not found.

◆ findOneOf()

int CFxString::findOneOf ( const OdChar lpszCharSet) const

Description: Finds the first occurrence of the any of the characters specified in lpszCharSet in this string, starting from the beginning.

Return Value: Index of first occurrence of one of the specified characters, otherwise -1 if none of the characers is found.

◆ findOneOfA()

int CFxString::findOneOfA ( const char *  lpszCharSet) const

Description: Finds the first occurrence of the any of the characters specified in lpszCharSet in this string, starting from the beginning.

Return Value: Index of first occurrence of one of the specified characters, otherwise -1 if none of the characers is found.

◆ findW() [1/2]

int CFxString::findW ( OdChar  ch) const

Description: Finds the first occurrence of the specified character in this string, starting from the beginning.

Return Value: Index of first occurrence of ch in this string, otherwise -1 if ch is not found.

◆ findW() [2/2]

int CFxString::findW ( OdChar  ch,
int  nStart 
) const

Description: Finds the first occurrence of the specified character in this string, starting from index nStart.

Return Value: Index of first occurrence of ch on or after nStart, otherwise -1 if ch is not found.

◆ format() [1/2]

CFxString& CFxString::format ( const OdChar lpszFormat,
const OdString str 
)

Assigns a value to this string using the printf-style format string and arguments.

◆ format() [2/2]

CFxString& CFxString::format ( const OdChar lpszFormat,
  ... 
)

Assigns a value to this string using the printf-style format string and arguments.

◆ formatA()

CFxString& CFxString::formatA ( const char *  lpszFormat,
  ... 
)

Assigns a value to this string using the printf-style format string and arguments.

◆ from_ansi_str() [1/2]

static CFxString CFxString::from_ansi_str ( const CFxAnsiStringClass data)
static

◆ from_ansi_str() [2/2]

static CFxString CFxString::from_ansi_str ( const char *  data)
static

◆ from_utf8_str() [1/2]

static CFxString CFxString::from_utf8_str ( const CFxAnsiStringClass data)
static

◆ from_utf8_str() [2/2]

static CFxString CFxString::from_utf8_str ( const char *  data)
static

◆ getAllocLength()

int CFxString::getAllocLength ( ) const

Returns the number of bytes allocated for the character data in this FxString.

◆ getAtA()

char CFxString::getAtA ( int  nIndex) const

Returns the single ASCII character at index nIndex of the string. No range checking is done.

◆ getAtWU()

OdChar CFxString::getAtWU ( int  nIndex) const

◆ GetCadCodePage()

OdCodePageId CFxString::GetCadCodePage ( unsigned int  codePage) const

◆ GetCodePage()

unsigned int CFxString::GetCodePage ( ) const

Returns code page for this string

◆ getLength()

int CFxString::getLength ( ) const

Returns the number of characters in this string.

◆ insert()

int CFxString::insert ( int  nIndex,
const OdChar pstr 
)

Description: Inserts string pstr into this string at index nIndex.

Remarks: If nIndex is beyond the current length, the string is lengthened to accommodate the insertion.

Return Value: The new length of this string.

◆ insertA() [1/2]

int CFxString::insertA ( int  nIndex,
char  ch 
)

Description: Inserts character ch into this string at index nIndex.

Remarks: If nIndex is beyond the current length, the string is lengthened to accommodate the insertion.

Return Value: The new length of this string.

◆ insertA() [2/2]

int CFxString::insertA ( int  nIndex,
const char *  pstr 
)

Description: Inserts string pstr into this string at index nIndex.

Remarks: If nIndex is beyond the current length, the string is lengthened to accommodate the insertion.

Return Value: The new length of this string.

◆ insertW()

int CFxString::insertW ( int  nIndex,
OdChar  ch 
)

Description: Inserts character ch into this string at index nIndex.

Remarks: If nIndex is beyond the current length, the string is lengthened to accommodate the insertion.

Return Value: The new length of this string.

◆ isEmpty()

bool CFxString::isEmpty ( ) const

Returns true if this string is empty, otherwise false.

◆ isNull()

bool CFxString::isNull ( ) const

Returns true if this string is null, otherwise false. Example: CFxString().isNull(); // returns true CFxString("").isNull(); // returns false CFxString("abc").isNull(); // returns false

◆ left()

CFxString CFxString::left ( int  nCount) const

Returns the first nCount characters in this FxString.

◆ makeLower()

CFxString& CFxString::makeLower ( )

Converts this string to lower case.

◆ makeReverse()

CFxString& CFxString::makeReverse ( )

Reverses this string right to left.

◆ makeUpper()

CFxString& CFxString::makeUpper ( )

Converts this string to upper case.

◆ mid() [1/2]

CFxString CFxString::mid ( int  nFirst) const

Returns all characters starting at index nFirst.

◆ mid() [2/2]

CFxString CFxString::mid ( int  nFirst,
int  nCount 
) const

Returns the nCount characters starting at index nFirst.

◆ multiArg()

CFxString CFxString::multiArg ( int  numArgs,
const CFxString **  args 
) const

◆ operator const QString &()

CFxString::operator const QString & ( ) const

Conversion operator returns a const pointer to QString referenced by this FxString.

◆ operator const wchar_t *()

CFxString::operator const wchar_t * ( ) const
inline

Conversion operator returns a const pointer to the underlying char array referenced by this FxString.

Definition at line 202 of file FxString.h.

◆ operator const Wt::WString &()

CFxString::operator const Wt::WString & ( ) const

Conversion operator returns a const pointer to Wt::WString referenced by this FxString.

◆ operator OdString()

CFxString::operator OdString ( ) const

Conversion operator returns a const pointer to OdAnsiString referenced by this FxString. Conversion operator returns a const pointer to OdWString referenced by this FxString.

◆ operator+=() [1/6]

const CFxString& CFxString::operator+= ( char  ch)

Description: String concatenation operator.

Remarks: This FxString is assigned the value of ch concatenated onto this FxString.

Return Value: The modified FxString.

◆ operator+=() [2/6]

const CFxString& CFxString::operator+= ( const CFxString stringSrc)

Description: String concatenation operator.

Remarks: This FxString is assigned the value of string concatenated onto this FxString.

Return Value: The modified FxString.

◆ operator+=() [3/6]

const CFxString& CFxString::operator+= ( const char *  lpsz)

Description: String concatenation operator.

Remarks: This FxString is assigned the value of lpsz concatenated onto this FxString.

Return Value: The modified FxString.

◆ operator+=() [4/6]

const CFxString& CFxString::operator+= ( const OdChar lpsz)

Description: String concatenation operator.

Remarks: This FxString is assigned the value of lpsz concatenated onto this FxString.

Return Value: The modified FxString.

◆ operator+=() [5/6]

const CFxString& CFxString::operator+= ( const OdString str)

◆ operator+=() [6/6]

const CFxString& CFxString::operator+= ( OdChar  ch)

Description: String concatenation operator.

Remarks: This FxString is assigned the value of ch concatenated onto this FxString.

Return Value: The modified FxString.

◆ operator=() [1/7]

const CFxString& CFxString::operator= ( char  ch)

Assignment operator. This FxString is assigned the value of ch.

◆ operator=() [2/7]

const CFxString& CFxString::operator= ( const CFxString stringSrc)

Assignment operator. This FxString is assigned the value of stringSrc.

◆ operator=() [3/7]

const CFxString& CFxString::operator= ( const char *  lpsz)

Assignment operator. This FxString is assigned the value of lpsz.

◆ operator=() [4/7]

const CFxString& CFxString::operator= ( const OdAnsiString &  stringSrc)

Assignment operator. This FxString is assigned the value of stringSrc.

◆ operator=() [5/7]

const CFxString& CFxString::operator= ( const OdChar lpsz)

Assignment operator. This FxString is assigned the value of lpsz.

◆ operator=() [6/7]

const CFxString& CFxString::operator= ( const OdString stringSrc)

Assignment operator. This FxString is assigned the value of stringSrc.

◆ operator=() [7/7]

const CFxString& CFxString::operator= ( OdChar  ch)

Assignment operator. This FxString is assigned the value of ch.

◆ removeA()

int CFxString::removeA ( char  chRemove)

Description: Removes all occurrences of chRemove from this FxString.

Return Value: Number of characters removed.

◆ removeW()

int CFxString::removeW ( OdChar  chRemove)

Description: Removes all occurrences of chRemove from this FxString.

Return Value: Number of characters removed.

◆ replace()

CFxString& CFxString::replace ( const OdChar lpszOld,
const OdChar lpszNew 
)

Description: Replaces all occurrences of the substring lpszOld in this FxString, with lpszNew.

Remarks: If lpszNew is the null string, all occurrences of lpszOld are deleted.

Return Value: Number of substrings replaced.

◆ replaceA() [1/2]

CFxString& CFxString::replaceA ( char  chOld,
char  chNew 
)

Description: Replaces all occurrences of chOld in this FxString, with chNew.

Return Value: Number of characters replaced.

◆ replaceA() [2/2]

CFxString& CFxString::replaceA ( const char *  lpszOld,
const char *  lpszNew 
)

Description: Replaces all occurrences of the substring lpszOld in this FxString, with lpszNew.

Remarks: If lpszNew is the null string, all occurrences of lpszOld are deleted.

Return Value: Number of substrings replaced.

◆ replaceW()

CFxString& CFxString::replaceW ( OdChar  chOld,
OdChar  chNew 
)

Description: Replaces all occurrences of chOld in this FxString, with chNew.

Return Value: Number of characters replaced.

◆ reverseFindA()

int CFxString::reverseFindA ( char  ch) const

Description: Finds the first occurrence of the specified character in this string, starting from the end.

Return Value: Index of last occurrence of ch in this string, otherwise -1 if ch is not found.

◆ reverseFindW()

int CFxString::reverseFindW ( OdChar  ch) const

Description: Finds the first occurrence of the specified character in this string, starting from the end.

Return Value: Index of last occurrence of ch in this string, otherwise -1 if ch is not found.

◆ right()

CFxString CFxString::right ( int  nCount) const

Returns the last nCount characters in this FxString.

◆ setAtA()

void CFxString::setAtA ( int  nIndex,
char  ch 
)

Sets the single ASCII character at index nIndex of the string. No range checking is done.

◆ setAtW()

void CFxString::setAtW ( int  nIndex,
OdChar  ch 
)

Sets the single UTF character at index nIndex of the string. No range checking is done.

◆ SetCodePage()

void CFxString::SetCodePage ( unsigned int  codePage)

Sets code page for this string

◆ spanExcluding()

CFxString CFxString::spanExcluding ( const OdChar lpszCharSet) const

Starting from the beginning of this FxString, returns a substring made up of the characters in this FxString that NOT contained in lpszCharSet. The substring terminates when the first character in FxString that IS also in lpszCharSet is encountered (this character is not appended to the substring). An empty string is returned if the first character in this FxString is present in lpszCharSet.

◆ spanExcludingA()

CFxString CFxString::spanExcludingA ( const char *  lpszCharSet) const

Starting from the beginning of this FxString, returns a substring made up of the characters in this FxString that NOT contained in lpszCharSet. The substring terminates when the first character in FxString that IS also in lpszCharSet is encountered (this character is not appended to the substring). An empty string is returned if the first character in this FxString is present in lpszCharSet.

◆ spanIncluding()

CFxString CFxString::spanIncluding ( const OdChar lpszCharSet) const

Starting from the beginning of this FxString, returns a substring made up of the characters in this FxString that are also contained in lpszCharSet. The substring terminates when the first character in FxString that is not also in lpszCharSet is encountered (this character is not appended to the substring). An empty string is returned if the first character in this FxString is not present in lpszCharSet.

◆ spanIncludingA()

CFxString CFxString::spanIncludingA ( const char *  lpszCharSet) const

Starting from the beginning of this FxString, returns a substring made up of the characters in this FxString that are also contained in lpszCharSet. The substring terminates when the first character in FxString that is not also in lpszCharSet is encountered (this character is not appended to the substring). An empty string is returned if the first character in this FxString is not present in lpszCharSet.

◆ SplitA()

CFxStringArray CFxString::SplitA ( char  separator) const

Splits the entire string to array of string by specified symbol

◆ SplitW()

CFxStringArray CFxString::SplitW ( OdChar  separator) const

Splits the entire string to array of string by specified symbol

◆ startsWith() [1/4]

bool CFxString::startsWith ( const char &  c) const

◆ startsWith() [2/4]

bool CFxString::startsWith ( const char *  s) const

◆ startsWith() [3/4]

bool CFxString::startsWith ( const OdChar c) const

◆ startsWith() [4/4]

bool CFxString::startsWith ( const OdChar s) const

return true if string starts with second string (case sensitive)

◆ startsWithNoCase() [1/4]

bool CFxString::startsWithNoCase ( const char &  c) const

◆ startsWithNoCase() [2/4]

bool CFxString::startsWithNoCase ( const char *  s) const

◆ startsWithNoCase() [3/4]

bool CFxString::startsWithNoCase ( const OdChar c) const

◆ startsWithNoCase() [4/4]

bool CFxString::startsWithNoCase ( const OdChar s) const

return true if string starts with second string (case insensitive)

◆ trimLeft() [1/2]

CFxString& CFxString::trimLeft ( )

Removes all whitespace from the left side or beginning of this string.

◆ trimLeft() [2/2]

CFxString& CFxString::trimLeft ( const OdChar lpszTargets)

Removes all consecutive occurrences of characters that are present in lpszTargets, from the beginning of this string.

◆ trimLeftA() [1/2]

CFxString& CFxString::trimLeftA ( char  chTarget)

Removes all consecutive occurrences of chTarget from the beginning of this string.

◆ trimLeftA() [2/2]

CFxString& CFxString::trimLeftA ( const char *  lpszTargets)

Removes all consecutive occurrences of characters that are present in lpszTargets, from the beginning of this string.

◆ trimLeftW()

CFxString& CFxString::trimLeftW ( OdChar  chTarget)

Removes all consecutive occurrences of chTarget from the beginning of this string.

◆ trimRight() [1/2]

CFxString& CFxString::trimRight ( )

Removes all whitespace from the right side or end of this string.

◆ trimRight() [2/2]

CFxString& CFxString::trimRight ( const OdChar lpszTargets)

Removes all consecutive occurrences of characters that are present in lpszTargets, from the end of this string.

◆ trimRightA() [1/2]

CFxString& CFxString::trimRightA ( char  chTarget)

Removes all consecutive occurrences of chTarget from the end of this string.

◆ trimRightA() [2/2]

CFxString& CFxString::trimRightA ( const char *  lpszTargets)

Removes all consecutive occurrences of characters that are present in lpszTargets, from the end of this string.

◆ trimRightW()

CFxString& CFxString::trimRightW ( OdChar  chTarget)

Removes all consecutive occurrences of chTarget from the end of this string.

◆ utf8_str()

CFxAnsiStringClass CFxString::utf8_str ( ) const

◆ vformat()

CFxString& CFxString::vformat ( const OdChar lpszFormat,
va_list  argList 
)

Creates a formatted string with a variable list of arguments in a fashion similar to vsprintf() .

◆ vformatA()

CFxString& CFxString::vformatA ( const char *  lpszFormat,
va_list  argList 
)

Creates a formatted string with a variable list of arguments in a fashion similar to vsprintf() .

◆ wide_strU()

const OdChar* CFxString::wide_strU ( ) const

Friends And Related Function Documentation

◆ CFxStringPrivate

friend class CFxStringPrivate
friend

Definition at line 51 of file FxString.h.

◆ operator+ [1/7]

DDKERNEL_API CFxString operator+ ( const CFxString string1,
const CFxString string2 
)
friend

◆ operator+ [2/7]

DDKERNEL_API CFxString operator+ ( const CFxString stringSrc,
char  ch 
)
friend

◆ operator+ [3/7]

DDKERNEL_API CFxString operator+ ( const CFxString stringSrc,
const char *  lpsz 
)
friend

◆ operator+ [4/7]

DDKERNEL_API CFxString operator+ ( const CFxString stringSrc,
const OdChar lpsz 
)
friend

◆ operator+ [5/7]

DDKERNEL_API CFxString operator+ ( const CFxString stringSrc,
OdChar  ch 
)
friend

◆ operator+ [6/7]

DDKERNEL_API CFxString operator+ ( const OdChar lpsz,
const CFxString stringSrc 
)
friend

◆ operator+ [7/7]

DDKERNEL_API CFxString operator+ ( OdChar  ch,
const CFxString stringSrc 
)
friend

Member Data Documentation

◆ m_private

CFxStringPrivate* CFxString::m_private
mutableprotected

pointer to ref counted UTF string data

Definition at line 920 of file FxString.h.


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