CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
Classes | Public Member Functions | Static Public Attributes | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Static Protected Attributes | Friends | List of all members
OdString Class Reference

#include <OdString.h>

Inheritance diagram for OdString:
OdConstString

Classes

struct  lessnocase
 

Public Member Functions

 OdString ()
 
 OdString (const OdString &source)
 
 OdString (OdChar ch, int length)
 
 OdString (const OdChar *source)
 
 OdString (const OdChar *source, int length)
 
 OdString (const char *lpch, OdCodePageId codepage=CP_CNT)
 
 OdString (const OdChar16_t *lpch, OdCodePageId codepage=CP_CNT)
 
 OdString (const char *lpch, int nLength, OdCodePageId codepage=CP_CNT)
 
 OdString (const OdAnsiString &)
 
int getLength () const
 
int getLengthA () const
 
bool isEmpty () const
 
void empty ()
 
OdChar getAt (int charIndex) const
 
OdChar operator[] (int charIndex) const
 
void setAt (int charIndex, OdChar ch)
 
const OdCharc_str () const
 
 operator const OdChar * () const
 
 operator const char * () const
 
OdStringoperator= (const OdString &source)
 
OdStringoperator= (OdChar ch)
 
OdStringoperator= (const OdChar *source)
 
OdStringoperator= (const OdChar16_t *source)
 
OdStringoperator= (const OdAnsiString &source)
 
OdStringoperator= (const char *source)
 
OdStringoperator+= (const OdString &string)
 
OdStringoperator+= (OdChar ch)
 
OdStringoperator+= (const OdChar *string)
 
OdStringoperator+= (const char *string)
 
int compare (const OdChar *otherString) const
 
int compare (const OdString &otherString) const
 
int compare (const char *otherString) const
 
int iCompare (const OdChar *otherString) const
 
int iCompare (const OdString &otherString) const
 
OdString mid (int startIndex, int length) const
 
OdString mid (int startIndex) const
 
OdString left (int length) const
 
OdString right (int length) const
 
OdString spanIncluding (const OdChar *charSet) const
 
OdString spanIncluding (const OdString &charSet) const
 
OdString spanExcluding (const OdChar *charSet) const
 
OdString spanExcluding (const OdString &charSet) const
 
OdStringmakeUpper ()
 
OdStringmakeLower ()
 
OdStringmakeReverse ()
 
OdStringtrimRight ()
 
OdStringtrimLeft ()
 
OdStringtrimRight (OdChar whiteChar)
 
OdStringtrimRight (const OdChar *whiteChars)
 
OdStringtrimRight (const OdString &whiteChars)
 
OdStringtrimLeft (OdChar whiteChar)
 
OdStringtrimLeft (const OdChar *whiteChars)
 
OdStringtrimLeft (const OdString &whiteChars)
 
int replace (OdChar oldChar, OdChar newChar)
 
int replace (const OdChar *oldString, const OdChar *newString)
 
int replace (const OdString &oldString, const OdString &newString)
 
int remove (OdChar chRemove)
 
int insert (int insertIndex, OdChar insertChar)
 
int insert (int insertIndex, const OdChar *insertString)
 
int insert (int insertIndex, const OdString &insertString)
 
int deleteChars (int deleteIndex, int count=1)
 
int find (OdChar searchChar) const
 
int reverseFind (OdChar searchChar) const
 
int reverseFind (OdChar searchChar, int startIndex) const
 
int find (OdChar searchChar, int startIndex) const
 
int findOneOf (const OdChar *charSet) const
 
int find (const OdChar *searchString) const
 
int find (const OdChar *searchString, int startIndex) const
 
OdStringformat (const OdChar *formatString,...)
 
OdStringformatV (const OdChar *formatString, va_list argList)
 
OdChargetBuffer (int minBufLength)
 
void releaseBuffer (int newLength=-1)
 
OdChargetBufferSetLength (int length)
 
void freeExtra ()
 
OdCharlockBuffer ()
 
void unlockBuffer ()
 
 ~OdString ()
 
int getAllocLength () const
 
void preallocate (int length)
 

Static Public Attributes

FIRSTDLL_EXPORT_STATIC static const OdString kEmpty
 

Protected Member Functions

 OdString (OdStringData *pData)
 
OdStringDatagetData () const
 
void init ()
 
void allocCopy (OdString &destString, int copyLength, int copyIndex, int extraLength) const
 
void allocBuffer (int length, bool allocAlways=false)
 
void assignCopy (int sourceLength, const OdChar *source)
 
void concatCopy (int sourceLength1, const OdChar *source1, int sourceLength2, const OdChar *source2)
 
void concatInPlace (int sourceLength, const OdChar *source)
 
void copyBeforeWrite ()
 
void allocBeforeWrite (int newLength)
 
void release ()
 
bool isUnicodeNotInSync () const
 
void syncUnicode () const
 
OdAnsiStringgetAnsiString () const
 
void freeAnsiString () const
 

Static Protected Member Functions

static void release (OdStringData *pStringData)
 
static int safeStrlen (const OdChar *string)
 
static void freeData (OdStringData *pStringData)
 

Protected Attributes

OdStringDatam_pData
 

Static Protected Attributes

static FIRSTDLL_EXPORT_STATIC OdStringData kEmptyData
 

Friends

class OdAnsiString
 
FIRSTDLL_EXPORT OdString operator+ (const OdString &string1, const OdString &string2)
 
FIRSTDLL_EXPORT OdString operator+ (const OdString &string, OdChar ch)
 
FIRSTDLL_EXPORT OdString operator+ (OdChar ch, const OdString &string)
 
FIRSTDLL_EXPORT OdString operator+ (const OdString &string1, const OdChar *string2)
 
FIRSTDLL_EXPORT OdString operator+ (const OdChar *string1, const OdString &string2)
 

Detailed Description

This class implements character String objects in the ODA Platform.

Remarks
OdString objects use zero-based indices to access string elements.

<group Other_Classes>

Definition at line 94 of file OdString.h.

Constructor & Destructor Documentation

◆ OdString() [1/10]

OdString::OdString ( )
inline

Definition at line 100 of file OdString.h.

◆ OdString() [2/10]

OdString::OdString ( const OdString source)
Parameters
source[in] Source.

◆ OdString() [3/10]

OdString::OdString ( OdChar  ch,
int  length 
)
Parameters
ch[in] Character to repeat.
length[in] Number of characters.

◆ OdString() [4/10]

OdString::OdString ( const OdChar source)

◆ OdString() [5/10]

OdString::OdString ( const OdChar source,
int  length 
)

◆ OdString() [6/10]

OdString::OdString ( const char *  lpch,
OdCodePageId  codepage = CP_CNT 
)

◆ OdString() [7/10]

OdString::OdString ( const OdChar16_t lpch,
OdCodePageId  codepage = CP_CNT 
)

◆ OdString() [8/10]

OdString::OdString ( const char *  lpch,
int  nLength,
OdCodePageId  codepage = CP_CNT 
)

◆ OdString() [9/10]

OdString::OdString ( const OdAnsiString )

◆ OdString() [10/10]

OdString::OdString ( OdStringData pData)
explicitprotected

◆ ~OdString()

OdString::~OdString ( )

Member Function Documentation

◆ allocBeforeWrite()

void OdString::allocBeforeWrite ( int  newLength)
protected

Assures the character buffer of this String object is at least the specified size.

Parameters
newLength[in] New length of buffer.
Remarks
If getAllocLength() < newLength, this function calls allocBuffer(newLength).

◆ allocBuffer()

void OdString::allocBuffer ( int  length,
bool  allocAlways = false 
)
protected

Allocates the specified number of characters for the character buffer of this String object.

Parameters
length[in] buffer length. allocAlways - if true, allocates new OdStringData even for 0 length unicode buffer (for ansi string constructors)

◆ allocCopy()

void OdString::allocCopy ( OdString destString,
int  copyLength,
int  copyIndex,
int  extraLength 
) const
protected

Copies the specified number of characters from this String object to the destination String object.

Parameters
destString[out] Destination string.
copyLength[in] Number of characters to copy.
copyIndex[in] First byte to copy.
extraLength[in] Extra characters to allocate.
Remarks
This function calls allocBuffer(copyLength + extraLength)

◆ assignCopy()

void OdString::assignCopy ( int  sourceLength,
const OdChar source 
)
protected

Copies the specified string to this String object.

Parameters
sourceLength[in] Number of characters to copy.
source[in] Source string.
Remarks
If getAllocLength() < sourceLength, this function calls allocBuffer(sourceLength).

◆ c_str()

const OdChar * OdString::c_str ( ) const
inline

Returns the underlying OdChar array (buffer) of this String object.

Definition at line 203 of file OdString.h.

◆ compare() [1/3]

int OdString::compare ( const char *  otherString) const

Case sensitive string comparison.

Parameters
otherString[in] Other string.
Remarks
compare() returns one of the following:

Condition < 0 This String object < otherString. 0 This String object == otherString.

‍0 This String object > otherString.

◆ compare() [2/3]

int OdString::compare ( const OdChar otherString) const
inline

Case sensitive string comparison.

Parameters
otherString[in] Other string.
Remarks
compare() returns one of the following:

Condition < 0 This String object < otherString. 0 This String object == otherString.

‍0 This String object > otherString.

Definition at line 326 of file OdString.h.

◆ compare() [3/3]

int OdString::compare ( const OdString otherString) const
inline

Case sensitive string comparison.

Parameters
otherString[in] Other string.
Remarks
compare() returns one of the following:

Condition < 0 This String object < otherString. 0 This String object == otherString.

‍0 This String object > otherString.

Definition at line 348 of file OdString.h.

◆ concatCopy()

void OdString::concatCopy ( int  sourceLength1,
const OdChar source1,
int  sourceLength2,
const OdChar source2 
)
protected

Concatenates and copies the specified strings to this String object.

Parameters
sourceLength1[in] Number of characters in first string to copy.
sourceLength2[in] Number of characters in second string to copy.
source1[in] First source string.
source2[in] Second source string.
Remarks
If getAllocLength() < (sourceLength1 + sourceLength2), this function calls allocBuffer(sourceLength1 + sourceLength2).

◆ concatInPlace()

void OdString::concatInPlace ( int  sourceLength,
const OdChar source 
)
protected

Concatenates the string to this String object.

Parameters
sourceLength[in] Number of characters to copy.
source[in] Source string.
Remarks
If getAllocLength() < getLength() + sourceLength, this function calls allocBuffer(getLength()+ sourceLength2).

◆ copyBeforeWrite()

void OdString::copyBeforeWrite ( )
protected

Assures there are no multiple references to the StringData associated with this String object.

Remarks
If there is more than one reference to the StringData object, it is released, and replaced with a copy thereof

◆ deleteChars()

int OdString::deleteChars ( int  deleteIndex,
int  count = 1 
)

Deletes the specified number characters from this String object.

Parameters
deleteIndex[in] Deletion index.
count[in] Number of characters to delete.
Returns
Returns the new length of this String object.

◆ empty()

void OdString::empty ( )

Sets this String object to the empty string.

◆ find() [1/4]

int OdString::find ( const OdChar searchString) const

Returns the first occurrence of the specified string in this String object.

Parameters
searchString[in] Search string.
Remarks
Returns -1 if not found.

◆ find() [2/4]

int OdString::find ( const OdChar searchString,
int  startIndex 
) const

Returns the first occurrence of the specified string in this String object.

Parameters
searchString[in] Search string.
startIndex[in] Start index of search.
Remarks
Returns -1 if not found.

◆ find() [3/4]

int OdString::find ( OdChar  searchChar) const

Returns the first occurrence of the specified character in this String object.

Parameters
searchChar[in] Search character.
Remarks
Returns -1 if not found.

◆ find() [4/4]

int OdString::find ( OdChar  searchChar,
int  startIndex 
) const

Returns the first occurrence of the specified character in this String object.

Parameters
searchChar[in] Search character.
startIndex[in] Start index of search.
Remarks
Returns -1 if not found.

◆ findOneOf()

int OdString::findOneOf ( const OdChar charSet) const

Returns the first occurrence in this String object of any member of the specified character set.

Parameters
charSet[in] Character set.
Remarks
Returns -1 if not found.

◆ format()

OdString & OdString::format ( const OdChar formatString,
  ... 
)

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

Parameters
formatString[in] Format string.
Returns
Returns a reference to this String Object.

◆ formatV()

OdString & OdString::formatV ( const OdChar formatString,
va_list  argList 
)

Assigns a value to this String object using a vsprintf-style format string and argument list.

Parameters
formatString[in] Format string.
argList[in] Argument list.
Returns
Returns a reference to this String Object.

◆ freeAnsiString()

void OdString::freeAnsiString ( ) const
protected

◆ freeData()

static void OdString::freeData ( OdStringData pStringData)
staticprotected

Frees the specified StringData object.

Parameters
pStringData[in] Pointer to the StringData object.

◆ freeExtra()

void OdString::freeExtra ( )

Releases any unused memory allocated by this String object.

◆ getAllocLength()

int OdString::getAllocLength ( ) const
inline

Returns the number of characters allocated for the underlying OdChar array (buffer) in this String object.

Definition at line 1088 of file OdString.h.

◆ getAnsiString()

OdAnsiString * OdString::getAnsiString ( ) const
inlineprotected

Definition at line 1232 of file OdString.h.

◆ getAt()

OdChar OdString::getAt ( int  charIndex) const
inline

Returns the single character of this String object at the specified position.

Parameters
charIndex[in] Character index.

Definition at line 159 of file OdString.h.

◆ getBuffer()

OdChar * OdString::getBuffer ( int  minBufLength)

Returns a modifiable C style OdChar array (buffer) of the specified minimum length for this String object.

Parameters
minBufferLength[in] Minimum buffer length.
Remarks
releaseBuffer() should be called before using any other OdString methods.

The pointer returned by this function is not valid after releaseBuffer() is called.

◆ getBufferSetLength()

OdChar * OdString::getBufferSetLength ( int  length)

Returns a modifiable C style OdChar array (buffer) of of the specified length for this String object.

Parameters
length[in] buffer length.
Remarks
releaseBuffer() should be called before using any other OdString methods.

The pointer returned by this function is not valid after releaseBuffer() is called.

◆ getData()

OdStringData * OdString::getData ( ) const
inlineprotected

Returns the StringData for this String object.

Definition at line 1115 of file OdString.h.

◆ getLength()

int OdString::getLength ( ) const
inline

Returns the number of characters in this String object.

Definition at line 133 of file OdString.h.

◆ getLengthA()

int OdString::getLengthA ( ) const

◆ iCompare() [1/2]

int OdString::iCompare ( const OdChar otherString) const
inline

Case insensitive string comparison.

Parameters
otherString[in] Other string.
Remarks
iCompare() returns one of the following:

Condition < 0 This String object < otherString. 0 This String object == otherString.

‍0 This String object > otherString.

Definition at line 401 of file OdString.h.

◆ iCompare() [2/2]

int OdString::iCompare ( const OdString otherString) const
inline

Case insensitive string comparison.

Parameters
otherString[in] Other string.
Remarks
iCompare() returns one of the following:

Condition < 0 This String object < otherString. 0 This String object == otherString.

‍0 This String object > otherString.

Definition at line 423 of file OdString.h.

◆ init()

void OdString::init ( )
protected

Initializes this String object to an empty string.

◆ insert() [1/3]

int OdString::insert ( int  insertIndex,
const OdChar insertString 
)
Parameters
insertString[in] String to insert.

Inserts the specified string into this String object.

Parameters
insertIndex[in] Insertion index.
insertString[in] String to insert.
Returns
Returns the new length of this String object.
Remarks
If insertIndex exceeds the length of this String object, this String object is lengthened as necessary to accommodate the insertion.

◆ insert() [2/3]

int OdString::insert ( int  insertIndex,
const OdString insertString 
)
inline

Inserts the specified string into this String object.

Parameters
insertIndex[in] Insertion index.
insertString[in] String to insert.
Returns
Returns the new length of this String object.
Remarks
If insertIndex exceeds the length of this String object, this String object is lengthened as necessary to accommodate the insertion.

Definition at line 797 of file OdString.h.

◆ insert() [3/3]

int OdString::insert ( int  insertIndex,
OdChar  insertChar 
)

Inserts the specified character into this String object.

\param insertIndex [in]  Insertion index.
Parameters
insertChar[in] Character to insert.
Returns
Returns the new length of this String object.
Remarks
If insertIndex exceeds the length of this String object, this String object is lengthened as necessary to accommodate the insertion.

◆ isEmpty()

bool OdString::isEmpty ( ) const
inline

Returns true and only if this String object is empty.

Definition at line 144 of file OdString.h.

◆ isUnicodeNotInSync()

bool OdString::isUnicodeNotInSync ( ) const
inlineprotected

Definition at line 1227 of file OdString.h.

◆ left()

OdString OdString::left ( int  length) const

Returns the leftmost substring of the specified length from this String object.

Parameters
length[in] Length of substring.

◆ lockBuffer()

OdChar * OdString::lockBuffer ( )

Enables reference counting for this String object.

◆ makeLower()

OdString & OdString::makeLower ( )

Converts this String object to lower case.

Returns
Returns a reference to this String object.

◆ makeReverse()

OdString & OdString::makeReverse ( )

Reverses this String object.

Returns
Returns a reference to this String object.

◆ makeUpper()

OdString & OdString::makeUpper ( )

Converts this String object to upper case.

Returns
Returns a reference to this String object.

◆ mid() [1/2]

OdString OdString::mid ( int  startIndex) const

Returns the substring specified by a start index from this String object.

Parameters
startIndex[in] Starting index.

◆ mid() [2/2]

OdString OdString::mid ( int  startIndex,
int  length 
) const

Returns the substring specified by a start index and a length from this String object.

Parameters
startIndex[in] Starting index.
length[in] Length of substring.

◆ operator const char *()

OdString::operator const char * ( ) const

◆ operator const OdChar *()

OdString::operator const OdChar * ( ) const
inline

Returns the underlying character array (buffer) of this String object.

Definition at line 215 of file OdString.h.

◆ operator+=() [1/4]

OdString & OdString::operator+= ( const char *  string)

Concatenation-Equals Operator.

\param string [in] Input value for concatenation
Remarks
Sets this object to the concatenation of this String object with the value on the right, and returns a reference to this String object.

◆ operator+=() [2/4]

OdString & OdString::operator+= ( const OdChar string)

Concatenation-Equals Operator.

\param string [in] Input value for concatenation
Remarks
Sets this object to the concatenation of this String object with the value on the right, and returns a reference to this String object.

◆ operator+=() [3/4]

OdString & OdString::operator+= ( const OdString string)

Concatenation-Equals Operator.

\param string [in] Input value for concatenation
Remarks
Sets this object to the concatenation of this String object with the value on the right, and returns a reference to this String object.

◆ operator+=() [4/4]

OdString & OdString::operator+= ( OdChar  ch)

Concatenation-Equals Operator.

\param ch [in] Input value for concatenation
Remarks
Sets this object to the concatenation of this String object with the value on the right, and returns a reference to this String object.

◆ operator=() [1/6]

OdString & OdString::operator= ( const char *  source)

◆ operator=() [2/6]

OdString & OdString::operator= ( const OdAnsiString source)

◆ operator=() [3/6]

OdString & OdString::operator= ( const OdChar source)

◆ operator=() [4/6]

OdString & OdString::operator= ( const OdChar16_t source)

◆ operator=() [5/6]

OdString & OdString::operator= ( const OdString source)

◆ operator=() [6/6]

OdString & OdString::operator= ( OdChar  ch)

◆ operator[]()

OdChar OdString::operator[] ( int  charIndex) const
inline

Indexing Operator

Returns
Returns the single character of this String object at the specified position.
Parameters
charIndex[in] Character index.

Definition at line 177 of file OdString.h.

◆ preallocate()

void OdString::preallocate ( int  length)
inline

Assures the character buffer of this String object is at least the specified size.

Parameters
length[in] New length of internal buffer.
Remarks
This function destroys the existing string contents if any. String length is set to 0.

Definition at line 1098 of file OdString.h.

◆ release() [1/2]

void OdString::release ( )
protected

Releases the reference to the specified StringData object.

Parameters
pStringData[in] Pointer to the StringData object.
Remarks
If pStringData is not specified, the StringData associated with this String object is released.

Decrements the reference count of the StringData object.

When its reference count reaches zero, the StringData object is freed.

◆ release() [2/2]

static void OdString::release ( OdStringData pStringData)
staticprotected

◆ releaseBuffer()

void OdString::releaseBuffer ( int  newLength = -1)

Releases a buffer obtained by getBuffer() or getBufferSetLength(), and sets its length.

Parameters
newLength[in] New buffer length.
Remarks
If newLength == -1, the buffer is treated as 0 terminated.

◆ remove()

int OdString::remove ( OdChar  chRemove)

Removes all occurrences of the specified character from this String object.

Parameters
removeChar[in] Character to remove.
Returns
Returns the number of characters removed.

◆ replace() [1/3]

int OdString::replace ( const OdChar oldString,
const OdChar newString 
)

Replaces all occurrences of the specified string in this String object.

Parameters
oldString[in] Old string.
newString[in] New string.
Returns
Returns the number of characters or strings replaced.

◆ replace() [2/3]

int OdString::replace ( const OdString oldString,
const OdString newString 
)
inline

Replaces all occurrences of the specified string in this String object.

Parameters
oldString[in] Old string.
newString[in] New string.
Returns
Returns the number of characters or strings replaced.

Definition at line 727 of file OdString.h.

◆ replace() [3/3]

int OdString::replace ( OdChar  oldChar,
OdChar  newChar 
)

Replaces all occurrences of the specified character in this String object.

Parameters
oldChar[in] Old character.
newChar[in] New character.
Returns
Returns the number of characters or strings replaced.

◆ reverseFind() [1/2]

int OdString::reverseFind ( OdChar  searchChar) const

Returns the last occurrence of the specified character in this String object.

Parameters
searchChar[in] Search character.
Remarks
Returns -1 if not found.

◆ reverseFind() [2/2]

int OdString::reverseFind ( OdChar  searchChar,
int  startIndex 
) const

Returns the last occurrence of the specified character in this String object.

Parameters
searchChar[in] Search character.
startIndex[in] An index from which to start searching back.
Remarks
Returns -1 if not found.

◆ right()

OdString OdString::right ( int  length) const

Returns the rightmost substring of the specified length from this String object.

Parameters
length[in] Length of substring.

◆ safeStrlen()

static int OdString::safeStrlen ( const OdChar string)
inlinestaticprotected

Returns the length of the specified string.

Parameters
string[in] 0 terminated string or NULL.
Remarks
Returns 0 if string == NULL.

Definition at line 1218 of file OdString.h.

◆ setAt()

void OdString::setAt ( int  charIndex,
OdChar  ch 
)

Sets the single character of this String object at the specified position.

Parameters
charIndex[in] Character index.
ch[in] Character.
Remarks
No range checking is performed.

◆ spanExcluding() [1/2]

OdString OdString::spanExcluding ( const OdChar charSet) const

Returns the longest leftmost substring of this String object that consists solely of characters that are not contained in the specified character set.

Parameters
charSet[in] Character set.
Remarks
If the first character in this String object in the specified character set, an empty string is returned.

◆ spanExcluding() [2/2]

OdString OdString::spanExcluding ( const OdString charSet) const
inline

Returns the longest leftmost substring of this String object that consists solely of characters that are not contained in the specified character set.

Parameters
charSet[in] Character set.
Remarks
If the first character in this String object in the specified character set, an empty string is returned.

Definition at line 535 of file OdString.h.

◆ spanIncluding() [1/2]

OdString OdString::spanIncluding ( const OdChar charSet) const

Returns the longest leftmost substring of this String object that consists solely of characters that are contained in the specified character set.

Parameters
charSet[in] Character set.
Remarks
If the first character in this String object is not in the specified character set, an empty string is returned.

◆ spanIncluding() [2/2]

OdString OdString::spanIncluding ( const OdString charSet) const
inline

Returns the longest leftmost substring of this String object that consists solely of characters that are contained in the specified character set.

Parameters
charSet[in] Character set.
Remarks
If the first character in this String object is not in the specified character set, an empty string is returned.

Definition at line 494 of file OdString.h.

◆ syncUnicode()

void OdString::syncUnicode ( ) const
protected

◆ trimLeft() [1/4]

OdString & OdString::trimLeft ( )

Removes all whitespace from the left side of this String object.

Returns
Returns a reference to this String object.
Remarks
A space (' ') is used if no other whitespace characters are specfied.

◆ trimLeft() [2/4]

OdString & OdString::trimLeft ( const OdChar whiteChars)

Removes all whitespace from the left side of this String object.

Parameters
whiteChars[in] Whitespace characters.
Returns
Returns a reference to this String object.
Remarks
A space (' ') is used if no other whitespace characters are specfied.

◆ trimLeft() [3/4]

OdString & OdString::trimLeft ( const OdString whiteChars)
inline

Removes all whitespace from the left side of this String object.

Parameters
whiteChars[in] Whitespace characters.
Returns
Returns a reference to this String object.
Remarks
A space (' ') is used if no other whitespace characters are specfied.

Definition at line 681 of file OdString.h.

◆ trimLeft() [4/4]

OdString & OdString::trimLeft ( OdChar  whiteChar)

Removes all whitespace from the left side of this String object.

Parameters
whiteChar[in] Whitespace character.
Returns
Returns a reference to this String object.
Remarks
A space (' ') is used if no other whitespace characters are specfied.

◆ trimRight() [1/4]

OdString & OdString::trimRight ( )

Removes all whitespace from the right side of this String object.

Returns
Returns a reference to this String object.
Remarks
A space (' ') is used if no whitespace characters are specfied.

◆ trimRight() [2/4]

OdString & OdString::trimRight ( const OdChar whiteChars)

Removes all whitespace from the right side of this String object.

Parameters
whiteChars[in] Whitespace characters.
Returns
Returns a reference to this String object.
Remarks
A space (' ') is used if no whitespace characters are specfied.

◆ trimRight() [3/4]

OdString & OdString::trimRight ( const OdString whiteChars)
inline

Removes all whitespace from the right side of this String object.

Parameters
whiteChars[in] Whitespace characters.
Returns
Returns a reference to this String object.
Remarks
A space (' ') is used if no whitespace characters are specfied.

Definition at line 631 of file OdString.h.

◆ trimRight() [4/4]

OdString & OdString::trimRight ( OdChar  whiteChar)

Removes all whitespace from the right side of this String object.

Parameters
whiteChar[in] Whitespace character.
Returns
Returns a reference to this String object.
Remarks
A space (' ') is used if no whitespace characters are specfied.

◆ unlockBuffer()

void OdString::unlockBuffer ( )

Disables reference counting for this String object.

Friends And Related Function Documentation

◆ OdAnsiString

friend class OdAnsiString
friend

Definition at line 1240 of file OdString.h.

◆ operator+ [1/5]

FIRSTDLL_EXPORT OdString operator+ ( const OdChar string1,
const OdString string2 
)
friend

◆ operator+ [2/5]

FIRSTDLL_EXPORT OdString operator+ ( const OdString string,
OdChar  ch 
)
friend

◆ operator+ [3/5]

FIRSTDLL_EXPORT OdString operator+ ( const OdString string1,
const OdChar string2 
)
friend

◆ operator+ [4/5]

FIRSTDLL_EXPORT OdString operator+ ( const OdString string1,
const OdString string2 
)
friend

Concatenation Operator.

Returns
Returns the concatenation of this object on the left with the object on the right.

◆ operator+ [5/5]

FIRSTDLL_EXPORT OdString operator+ ( OdChar  ch,
const OdString string 
)
friend

Member Data Documentation

◆ kEmpty

FIRSTDLL_EXPORT_STATIC static const OdString OdString::kEmpty
static

Definition at line 98 of file OdString.h.

◆ kEmptyData

FIRSTDLL_EXPORT_STATIC OdStringData OdString::kEmptyData
staticprotected

Definition at line 1105 of file OdString.h.

◆ m_pData

OdStringData* OdString::m_pData
protected

Pointer to the underlying OdChar array (buffer).

Definition at line 1110 of file OdString.h.


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