CrystalSpace

Public API Reference

Main Page | Modules | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

csString Class Reference

This is a string class with a range of useful operators and type-safe overloads. More...

#include <csutil/csstring.h>

List of all members.

Public Member Functions

void SetCapacity (size_t NewSize)
 Advise the string that it should allocate enough space to hold up to NewSize characters.
size_t GetCapacity () const
 Return the current capacity.
void SetGrowsBy (size_t)
 Advise the string that it should grow by approximately this many bytes when more space is required.
size_t GetGrowsBy () const
 Return the number of bytes by which the string grows.
void SetGrowsExponentially (bool b)
 Tell the string to re-size its buffer exponentially as needed.
bool GetGrowsExponentially () const
 Returns true if exponential growth is enabled.
void Free ()
 Free the memory allocated for the string.
csStringTruncate (size_t Len)
 Truncate the string.
csStringReclaim ()
 Set string buffer capacity to hold exactly the current content.
csStringClear ()
 Clear the string (so that it contains only a null terminator).
char * GetData ()
 Get a pointer to the null-terminated character array.
char const * GetData () const
 Get a pointer to the null-terminated character array.
char const * GetDataSafe () const
 Get a pointer to the null-terminated character array.
size_t Length () const
 Query string length.
bool IsEmpty () const
 Check if string is empty.
char & operator[] (size_t n)
 Get a modifiable reference to n'th character.
char operator[] (size_t n) const
 Get n'th character.
void SetAt (size_t n, const char c)
 Set the n'th character.
char GetAt (size_t n) const
 Get the n'th character.
csStringDeleteAt (size_t Pos, size_t Count=1)
 Delete a range of characters from the string.
csStringInsert (size_t Pos, const csString &Str)
 Insert another string into this one.
csStringInsert (size_t Pos, const char *Str)
 Insert another string into this one.
csStringInsert (size_t Pos, char C)
 Insert another string into this one.
csStringOverwrite (size_t Pos, const csString &Str)
 Overlay another string onto a part of this string.
csStringAppend (const char *Str, size_t Count=(size_t)-1)
 Append a null-terminated C-string to this one.
csStringAppend (const csString &Str, size_t Count=(size_t)-1)
 Append a string to this one.
csStringAppend (char c)
 Append a signed character to this string.
csStringAppend (unsigned char c)
 Append an unsigned character to this string.
csString Slice (size_t start, size_t len) const
 Copy and return a portion of this string.
void SubString (csString &sub, size_t start, size_t len) const
 Copy a portion of this string.
size_t FindFirst (char c, size_t pos=0) const
 Find the first occurrence of a character in the string.
size_t FindFirst (const char *c, size_t pos=0) const
 Find the first occurrence of any of a set of characters in the string.
size_t FindLast (char c, size_t pos=(size_t)-1) const
 Find the last occurrence of a character in the string.
size_t FindStr (const char *str, size_t pos=0) const
 Find the occurrence of a substring in the string.
void FindReplace (const char *str, const char *replaceWith)
 Find the occurrence of a substring in the string and replace it with another string.
csStringAppend (bool b)
 Append a boolean (as a number -- 1 or 0) to this string.
csStringReplace (const csString &Str, size_t Count=(size_t)-1)
 Replace contents of this string with the contents of another.
csStringReplace (const char *Str, size_t Count=(size_t)-1)
 Replace contents of this string with the contents of another.
bool Compare (const csString &iStr) const
 Check if another string is equal to this one.
bool Compare (const char *iStr) const
 Check if a null-terminated C- string is equal to this string.
bool CompareNoCase (const csString &iStr) const
 Check if another string is equal to this one.
bool CompareNoCase (const char *iStr) const
 Check if a null-terminated C- string is equal to this string.
bool StartsWith (const csString &iStr, bool ignore_case=false) const
 Check if this string starts with another one.
bool StartsWith (const char *iStr, bool ignore_case=false) const
 Check if this string starts with a null-terminated C- string.
 csString ()
 Create an empty csString object.
 csString (size_t Length)
 Create a csString object and reserve space for at least Length characters.
 csString (const csString &copy)
 Copy constructor.
 csString (const char *src)
 Create a csString object from a null-terminated C string.
 csString (char c)
 Create a csString object from a single signed character.
 csString (unsigned char c)
 Create a csString object from a single unsigned character.
virtual ~csString ()
 Destroy the csString.
csString Clone () const
 Get a copy of this string.
csStringLTrim ()
 Trim leading whitespace.
csStringRTrim ()
 Trim trailing whitespace.
csStringTrim ()
 Trim leading and trailing whitespace.
csStringCollapse ()
 Trim leading and trailing whitespace, and collapse all internal whitespace to a single space.
csStringFormat (const char *format,...)
 Format this string using sprintf()-style formatting directives.
csStringFormatV (const char *format, va_list args)
 Format this string using sprintf() formatting directives in a va_list.
csStringPadLeft (size_t NewSize, char PadChar= ' ')
 Pad to a specified size with leading characters.
csString AsPadLeft (size_t NewSize, char PadChar= ' ') const
 Return a copy of this string formatted with PadLeft().
csStringPadRight (size_t NewSize, char PadChar= ' ')
 Pad to a specified size with trailing characters.
csString AsPadRight (size_t NewSize, char PadChar= ' ') const
 Return a copy of this string formatted with PadRight().
csStringPadCenter (size_t NewSize, char PadChar= ' ')
 Pad to a specified size with leading and trailing characters so as to center the string.
csString AsPadCenter (size_t NewSize, char PadChar= ' ') const
 Return a copy of this string formatted with PadCenter().
csString operator+ (const csString &iStr) const
 Add another string to this one and return the result as a new string.
 operator const char * () const
 Get a pointer to the null-terminated character array.
bool operator== (const csString &Str) const
 Check if another string is equal to this one.
bool operator== (const char *Str) const
 Check if another string is equal to this one.
bool operator< (const csString &Str) const
 Check if another string is less than this one.
bool operator< (const char *Str) const
 Check if another string is less than this one.
bool operator> (const csString &Str) const
 Check to see if a string is greater than this one.
bool operator> (const char *Str) const
 Check to see if a string is greater than this one.
bool operator!= (const csString &Str) const
 Check if another string is not equal to this one.
bool operator!= (const char *Str) const
 Check if another string is not equal to this one.
csStringDowncase ()
 Convert this string to lower-case.
csStringUpcase ()
 Convert this string to upper-case.
char * Detach ()
 Detach the low-level null-terminated C-string buffer from the csString object.
csStringAppend (short n)
 Append the value, in formatted form, to this string.
csStringAppend (unsigned short n)
 Append the value, in formatted form, to this string.
csStringAppend (int n)
 Append the value, in formatted form, to this string.
csStringAppend (unsigned int n)
 Append the value, in formatted form, to this string.
csStringAppend (long n)
 Append the value, in formatted form, to this string.
csStringAppend (unsigned long n)
 Append the value, in formatted form, to this string.
csStringAppend (float n)
 Append the value, in formatted form, to this string.
csStringAppend (double n)
 Append the value, in formatted form, to this string.
csStringReplace (char s)
 Replace contents of this string with the value in formatted form.
csStringReplace (unsigned char s)
 Replace contents of this string with the value in formatted form.
csStringReplace (short s)
 Replace contents of this string with the value in formatted form.
csStringReplace (unsigned short s)
 Replace contents of this string with the value in formatted form.
csStringReplace (int s)
 Replace contents of this string with the value in formatted form.
csStringReplace (unsigned int s)
 Replace contents of this string with the value in formatted form.
csStringReplace (long s)
 Replace contents of this string with the value in formatted form.
csStringReplace (unsigned long s)
 Replace contents of this string with the value in formatted form.
csStringReplace (float s)
 Replace contents of this string with the value in formatted form.
csStringReplace (double s)
 Replace contents of this string with the value in formatted form.
csStringReplace (bool s)
 Replace contents of this string with the value in formatted form.
const csStringoperator= (const csString &s)
 Assign a formatted value to this string.
const csStringoperator= (const char *s)
 Assign a formatted value to this string.
const csStringoperator= (char s)
 Assign a formatted value to this string.
const csStringoperator= (unsigned char s)
 Assign a formatted value to this string.
const csStringoperator= (short s)
 Assign a formatted value to this string.
const csStringoperator= (unsigned short s)
 Assign a formatted value to this string.
const csStringoperator= (int s)
 Assign a formatted value to this string.
const csStringoperator= (unsigned int s)
 Assign a formatted value to this string.
const csStringoperator= (long s)
 Assign a formatted value to this string.
const csStringoperator= (unsigned long s)
 Assign a formatted value to this string.
const csStringoperator= (float s)
 Assign a formatted value to this string.
const csStringoperator= (double s)
 Assign a formatted value to this string.
const csStringoperator= (bool s)
 Assign a formatted value to this string.
csStringoperator+= (const csString &s)
 Append a formatted value to this string.
csStringoperator+= (const char *s)
 Append a formatted value to this string.
csStringoperator+= (char s)
 Append a formatted value to this string.
csStringoperator+= (unsigned char s)
 Append a formatted value to this string.
csStringoperator+= (short s)
 Append a formatted value to this string.
csStringoperator+= (unsigned short s)
 Append a formatted value to this string.
csStringoperator+= (int s)
 Append a formatted value to this string.
csStringoperator+= (unsigned int s)
 Append a formatted value to this string.
csStringoperator+= (long s)
 Append a formatted value to this string.
csStringoperator+= (unsigned long s)
 Append a formatted value to this string.
csStringoperator+= (float s)
 Append a formatted value to this string.
csStringoperator+= (double s)
 Append a formatted value to this string.
csStringoperator+= (bool s)
 Append a formatted value to this string.

Static Public Member Functions

csString Format (short v)
 Format this value using a sprintf() formatting directive.
csString Format (unsigned short v)
 Format this value using a sprintf() formatting directive.
csString Format (int v)
 Format this value using a sprintf() formatting directive.
csString Format (unsigned int v)
 Format this value using a sprintf() formatting directive.
csString Format (long v)
 Format this value using a sprintf() formatting directive.
csString Format (unsigned long v)
 Format this value using a sprintf() formatting directive.
csString Format (float v)
 Format this value using a sprintf() formatting directive.
csString Format (double v)
 Format this value using a sprintf() formatting directive.
csString Format (short v, int width, int prec=0)
 Format this value using a sprintf() formatting directive.
csString Format (unsigned short v, int width, int prec=0)
 Format this value using a sprintf() formatting directive.
csString Format (int v, int width, int prec=0)
 Format this value using a sprintf() formatting directive.
csString Format (unsigned int v, int width, int prec=0)
 Format this value using a sprintf() formatting directive.
csString Format (long v, int width, int prec=0)
 Format this value using a sprintf() formatting directive.
csString Format (unsigned long v, int width, int prec=0)
 Format this value using a sprintf() formatting directive.
csString Format (float v, int width, int prec=6)
 Format this value using a sprintf() formatting directive.
csString Format (double v, int width, int prec=6)
 Format this value using a sprintf() formatting directive.
csString PadLeft (const csString &v, size_t iNewSize, char iChar=' ')
 Return a new left-padded string representation of a basic type.
csString PadLeft (const char *v, size_t iNewSize, char iChar=' ')
 Return a new left-padded string representation of a basic type.
csString PadLeft (char v, size_t iNewSize, char iChar=' ')
 Return a new left-padded string representation of a basic type.
csString PadLeft (unsigned char v, size_t iNewSize, char iChar=' ')
 Return a new left-padded string representation of a basic type.
csString PadLeft (short v, size_t iNewSize, char iChar=' ')
 Return a new left-padded string representation of a basic type.
csString PadLeft (unsigned short v, size_t iNewSize, char iChar=' ')
 Return a new left-padded string representation of a basic type.
csString PadLeft (int v, size_t iNewSize, char iChar=' ')
 Return a new left-padded string representation of a basic type.
csString PadLeft (unsigned int v, size_t iNewSize, char iChar=' ')
 Return a new left-padded string representation of a basic type.
csString PadLeft (long v, size_t iNewSize, char iChar=' ')
 Return a new left-padded string representation of a basic type.
csString PadLeft (unsigned long v, size_t iNewSize, char iChar=' ')
 Return a new left-padded string representation of a basic type.
csString PadLeft (float v, size_t iNewSize, char iChar=' ')
 Return a new left-padded string representation of a basic type.
csString PadLeft (double v, size_t iNewSize, char iChar=' ')
 Return a new left-padded string representation of a basic type.
csString PadLeft (bool v, size_t iNewSize, char iChar=' ')
 Return a new left-padded string representation of a basic type.
csString PadRight (const csString &v, size_t iNewSize, char iChar=' ')
 Return a new right-padded string representation of a basic type.
csString PadRight (const char *v, size_t iNewSize, char iChar=' ')
 Return a new right-padded string representation of a basic type.
csString PadRight (char v, size_t iNewSize, char iChar=' ')
 Return a new right-padded string representation of a basic type.
csString PadRight (unsigned char v, size_t iNewSize, char iChar=' ')
 Return a new right-padded string representation of a basic type.
csString PadRight (short v, size_t iNewSize, char iChar=' ')
 Return a new right-padded string representation of a basic type.
csString PadRight (unsigned short v, size_t iNewSize, char iChar=' ')
 Return a new right-padded string representation of a basic type.
csString PadRight (int v, size_t iNewSize, char iChar=' ')
 Return a new right-padded string representation of a basic type.
csString PadRight (unsigned int v, size_t iNewSize, char iChar=' ')
 Return a new right-padded string representation of a basic type.
csString PadRight (long v, size_t iNewSize, char iChar=' ')
 Return a new right-padded string representation of a basic type.
csString PadRight (unsigned long v, size_t iNewSize, char iChar=' ')
 Return a new right-padded string representation of a basic type.
csString PadRight (float v, size_t iNewSize, char iChar=' ')
 Return a new right-padded string representation of a basic type.
csString PadRight (double v, size_t iNewSize, char iChar=' ')
 Return a new right-padded string representation of a basic type.
csString PadRight (bool v, size_t iNewSize, char iChar=' ')
 Return a new right-padded string representation of a basic type.
csString PadCenter (const csString &v, size_t iNewSize, char iChar=' ')
 Return a new left+right padded string representation of a basic type.
csString PadCenter (const char *v, size_t iNewSize, char iChar=' ')
 Return a new left+right padded string representation of a basic type.
csString PadCenter (char v, size_t iNewSize, char iChar=' ')
 Return a new left+right padded string representation of a basic type.
csString PadCenter (unsigned char v, size_t iNewSize, char iChar=' ')
 Return a new left+right padded string representation of a basic type.
csString PadCenter (short v, size_t iNewSize, char iChar=' ')
 Return a new left+right padded string representation of a basic type.
csString PadCenter (unsigned short v, size_t iNewSize, char iChar=' ')
 Return a new left+right padded string representation of a basic type.
csString PadCenter (int v, size_t iNewSize, char iChar=' ')
 Return a new left+right padded string representation of a basic type.
csString PadCenter (unsigned int v, size_t iNewSize, char iChar=' ')
 Return a new left+right padded string representation of a basic type.
csString PadCenter (long v, size_t iNewSize, char iChar=' ')
 Return a new left+right padded string representation of a basic type.
csString PadCenter (unsigned long v, size_t iNewSize, char iChar=' ')
 Return a new left+right padded string representation of a basic type.
csString PadCenter (float v, size_t iNewSize, char iChar=' ')
 Return a new left+right padded string representation of a basic type.
csString PadCenter (double v, size_t iNewSize, char iChar=' ')
 Return a new left+right padded string representation of a basic type.
csString PadCenter (bool v, size_t iNewSize, char iChar=' ')
 Return a new left+right padded string representation of a basic type.

Protected Member Functions

void Mug (csString &other)
 Move the data pointer and associated info over from other.


Detailed Description

This is a string class with a range of useful operators and type-safe overloads.

Strings may contain arbitary binary data, including null bytes. It also guarantees that a null-terminator always follows the last stored character, thus you can safely use the return value from GetData() and `operator char const*()' in calls to functions expecting C strings. The implicit null terminator is not included in the character count returned by Length().

Like a typical C character string pointer, csString can also represent a null pointer. This allows a non-string to be distinguished from an empty (zero-length) string. The csString will represent a null-pointer in the following cases:

Definition at line 55 of file csstring.h.


Constructor & Destructor Documentation

csString::csString  )  [inline]
 

Create an empty csString object.

Remarks:
The newly constructed string represents a null-pointer.

Definition at line 548 of file csstring.h.

Referenced by Clone().

csString::csString size_t  Length  )  [inline]
 

Create a csString object and reserve space for at least Length characters.

Remarks:
The newly constructed string represents a non-null zero-length string.

Definition at line 556 of file csstring.h.

References SetCapacity().

csString::csString const csString copy  )  [inline]
 

Copy constructor.

Remarks:
The newly constructed string will represent a null-pointer if and only if the template string represented a null-pointer.

Definition at line 565 of file csstring.h.

References Append().

csString::csString const char *  src  )  [inline]
 

Create a csString object from a null-terminated C string.

Remarks:
The newly constructed string will represent a null-pointer if and only if the input argument is a null-pointer.

Definition at line 574 of file csstring.h.

References Append().

csString::csString char  c  )  [inline]
 

Create a csString object from a single signed character.

Definition at line 579 of file csstring.h.

References Append().

csString::csString unsigned char  c  )  [inline]
 

Create a csString object from a single unsigned character.

Definition at line 584 of file csstring.h.

References Append().

virtual csString::~csString  )  [virtual]
 

Destroy the csString.


Member Function Documentation

csString& csString::Append bool  b  )  [inline]
 

Append a boolean (as a number -- 1 or 0) to this string.

Definition at line 401 of file csstring.h.

References Append().

csString& csString::Append double  n  )  [inline]
 

Append the value, in formatted form, to this string.

Definition at line 396 of file csstring.h.

csString& csString::Append float  n  )  [inline]
 

Append the value, in formatted form, to this string.

Definition at line 395 of file csstring.h.

csString& csString::Append unsigned long  n  )  [inline]
 

Append the value, in formatted form, to this string.

Definition at line 394 of file csstring.h.

csString& csString::Append long  n  )  [inline]
 

Append the value, in formatted form, to this string.

Definition at line 393 of file csstring.h.

csString& csString::Append unsigned int  n  )  [inline]
 

Append the value, in formatted form, to this string.

Definition at line 392 of file csstring.h.

csString& csString::Append int  n  )  [inline]
 

Append the value, in formatted form, to this string.

Definition at line 391 of file csstring.h.

csString& csString::Append unsigned short  n  )  [inline]
 

Append the value, in formatted form, to this string.

Definition at line 390 of file csstring.h.

csString& csString::Append short  n  )  [inline]
 

Append the value, in formatted form, to this string.

Definition at line 389 of file csstring.h.

csString& csString::Append unsigned char  c  )  [inline]
 

Append an unsigned character to this string.

Returns:
Reference to itself.

Definition at line 321 of file csstring.h.

References Append().

csString& csString::Append char  c  )  [inline]
 

Append a signed character to this string.

Returns:
Reference to itself.

Definition at line 314 of file csstring.h.

References Append().

csString& csString::Append const csString Str,
size_t  Count = (size_t)-1
 

Append a string to this one.

Parameters:
Str String which will be appended.
Count Number of characters from Str to append; if -1 (the default), then all characters from Str will be appended.
Returns:
Reference to itself.

csString& csString::Append const char *  Str,
size_t  Count = (size_t)-1
 

Append a null-terminated C-string to this one.

Parameters:
Str String which will be appended.
Count Number of characters from Str to append; if -1 (the default), then all characters from Str will be appended.
Returns:
Reference to itself.

Referenced by Append(), csString(), operator+(), operator+(), and operator=().

csString csString::AsPadCenter size_t  NewSize,
char  PadChar = ' '
const
 

Return a copy of this string formatted with PadCenter().

csString csString::AsPadLeft size_t  NewSize,
char  PadChar = ' '
const
 

Return a copy of this string formatted with PadLeft().

csString csString::AsPadRight size_t  NewSize,
char  PadChar = ' '
const
 

Return a copy of this string formatted with PadRight().

csString& csString::Clear  )  [inline]
 

Clear the string (so that it contains only a null terminator).

Returns:
Reference to itself.
Remarks:
This is rigidly equivalent to Truncate(0), but more idiomatic in terms of human language.

Definition at line 162 of file csstring.h.

References Truncate().

csString csString::Clone  )  const [inline]
 

Get a copy of this string.

Remarks:
The newly constructed string will represent a null-pointer if and only if this string represents a null-pointer.

Definition at line 596 of file csstring.h.

References csString().

Referenced by operator+(), and operator+().

csString& csString::Collapse  ) 
 

Trim leading and trailing whitespace, and collapse all internal whitespace to a single space.

Returns:
Reference to itself.

bool csString::Compare const char *  iStr  )  const [inline]
 

Check if a null-terminated C- string is equal to this string.

Parameters:
iStr Other string.
Returns:
True if they are equal; false if not.
Remarks:
The comparison is case-sensitive.

Definition at line 470 of file csstring.h.

bool csString::Compare const csString iStr  )  const [inline]
 

Check if another string is equal to this one.

Parameters:
iStr Other string.
Returns:
True if they are equal; false if not.
Remarks:
The comparison is case-sensitive.

Definition at line 452 of file csstring.h.

References Length().

Referenced by operator!=(), and operator==().

bool csString::CompareNoCase const char *  iStr  )  const [inline]
 

Check if a null-terminated C- string is equal to this string.

Parameters:
iStr Other string.
Returns:
True if they are equal; false if not.
Remarks:
The comparison is case-insensitive.

Definition at line 497 of file csstring.h.

References csStrNCaseCmp().

bool csString::CompareNoCase const csString iStr  )  const [inline]
 

Check if another string is equal to this one.

Parameters:
iStr Other string.
Returns:
True if they are equal; false if not.
Remarks:
The comparison is case-insensitive.

Definition at line 479 of file csstring.h.

References csStrNCaseCmp(), GetData(), and Length().

csString& csString::DeleteAt size_t  Pos,
size_t  Count = 1
 

Delete a range of characters from the string.

Parameters:
Pos Beginning of range to be deleted (zero-based).
Count Number of characters to delete.
Returns:
Reference to itself.

char* csString::Detach  )  [inline]
 

Detach the low-level null-terminated C-string buffer from the csString object.

Returns:
The low-level null-terminated C-string buffer, or zero if this string represents a null-pointer. See the class description for a discussion about how and when the string will represent a null-pointer.
Remarks:
The caller of this function becomes the owner of the returned string buffer and is responsible for destroying it via `delete[]' when no longer needed.

Definition at line 940 of file csstring.h.

csString& csString::Downcase  ) 
 

Convert this string to lower-case.

Returns:
Reference to itself.

size_t csString::FindFirst const char *  c,
size_t  pos = 0
const
 

Find the first occurrence of any of a set of characters in the string.

Parameters:
c Characters to locate.
pos Start position of search (default 0).
Returns:
First position of character, or (size_t)-1 if not found.

size_t csString::FindFirst char  c,
size_t  pos = 0
const
 

Find the first occurrence of a character in the string.

Parameters:
c Character to locate.
pos Start position of search (default 0).
Returns:
First position of character, or (size_t)-1 if not found.

size_t csString::FindLast char  c,
size_t  pos = (size_t)-1
const
 

Find the last occurrence of a character in the string.

Parameters:
c Character to locate.
pos Start position of reverse search. Specify (size_t)-1 if you want the search to begin at the very end of string.
Returns:
Last position of character, or (size_t)-1 if not found.

void csString::FindReplace const char *  str,
const char *  replaceWith
 

Find the occurrence of a substring in the string and replace it with another string.

size_t csString::FindStr const char *  str,
size_t  pos = 0
const
 

Find the occurrence of a substring in the string.

Parameters:
str String to locate.
pos Start position of search (default 0).
Returns:
First position of string, or (size_t)-1 if not found.

csString csString::Format double  v,
int  width,
int  prec = 6
[static]
 

Format this value using a sprintf() formatting directive.

csString csString::Format float  v,
int  width,
int  prec = 6
[static]
 

Format this value using a sprintf() formatting directive.

csString csString::Format unsigned long  v,
int  width,
int  prec = 0
[static]
 

Format this value using a sprintf() formatting directive.

csString csString::Format long  v,
int  width,
int  prec = 0
[static]
 

Format this value using a sprintf() formatting directive.

csString csString::Format unsigned int  v,
int  width,
int  prec = 0
[static]
 

Format this value using a sprintf() formatting directive.

csString csString::Format int  v,
int  width,
int  prec = 0
[static]
 

Format this value using a sprintf() formatting directive.

csString csString::Format unsigned short  v,
int  width,
int  prec = 0
[static]
 

Format this value using a sprintf() formatting directive.

csString csString::Format short  v,
int  width,
int  prec = 0
[static]
 

Format this value using a sprintf() formatting directive.

csString csString::Format double  v  )  [static]
 

Format this value using a sprintf() formatting directive.

csString csString::Format float  v  )  [static]
 

Format this value using a sprintf() formatting directive.

csString csString::Format unsigned long  v  )  [static]
 

Format this value using a sprintf() formatting directive.

csString csString::Format long  v  )  [static]
 

Format this value using a sprintf() formatting directive.

csString csString::Format unsigned int  v  )  [static]
 

Format this value using a sprintf() formatting directive.

csString csString::Format int  v  )  [static]
 

Format this value using a sprintf() formatting directive.

csString csString::Format unsigned short  v  )  [static]
 

Format this value using a sprintf() formatting directive.

csString csString::Format short  v  )  [static]
 

Format this value using a sprintf() formatting directive.

csString& csString::Format const char *  format,
  ...
 

Format this string using sprintf()-style formatting directives.

Returns:
Reference to itself.
Remarks:
Automatically allocates sufficient memory to hold result. Newly formatted string replaces previous string value.

csString& csString::FormatV const char *  format,
va_list  args
 

Format this string using sprintf() formatting directives in a va_list.

Returns:
Reference to itself.
Remarks:
Automatically allocates sufficient memory to hold result. Newly formatted string replaces previous string value.

Referenced by csDebugImageWriter::DebugImageWrite().

void csString::Free  ) 
 

Free the memory allocated for the string.

Remarks:
Following a call to this method, invocations of GetData() and 'operator char const*' will return a null pointer (until some new content is added to the string).

char csString::GetAt size_t  n  )  const [inline]
 

Get the n'th character.

Definition at line 244 of file csstring.h.

size_t csString::GetCapacity  )  const [inline]
 

Return the current capacity.

Definition at line 92 of file csstring.h.

char const* csString::GetData  )  const [inline]
 

Get a pointer to the null-terminated character array.

Returns:
A C-string pointer to the null-terminated character array; or zero if the string represents a null-pointer.
Remarks:
See the class description for a discussion about how and when the string will represent a null-pointer.

Definition at line 186 of file csstring.h.

char* csString::GetData  )  [inline]
 

Get a pointer to the null-terminated character array.

Returns:
A C-string pointer to the null-terminated character array; or zero if the string represents a null-pointer.
Remarks:
See the class description for a discussion about how and when the string will represent a null-pointer.
Warning:
This returns a non-const pointer, so use this function with care!
Deprecated:
Use the 'const' version of GetData() instead.

Definition at line 176 of file csstring.h.

Referenced by CompareNoCase(), csDebugImageWriter::DebugImageWrite(), and StartsWith().

char const* csString::GetDataSafe  )  const [inline]
 

Get a pointer to the null-terminated character array.

Returns:
A C-string pointer to the null-terminated character array.
Remarks:
Unlike GetData(), this will always return a valid, non-null C-string, even if the underlying representation is that of a null-pointer (in which case, it will return a zero-length C-string. This is a handy convenience which makes it possible to use the result directly without having to perform a null check first.

Definition at line 198 of file csstring.h.

Referenced by operator<(), and operator>().

size_t csString::GetGrowsBy  )  const [inline]
 

Return the number of bytes by which the string grows.

Definition at line 105 of file csstring.h.

bool csString::GetGrowsExponentially  )  const [inline]
 

Returns true if exponential growth is enabled.

Definition at line 116 of file csstring.h.

csString& csString::Insert size_t  Pos,
char  C
 

Insert another string into this one.

Parameters:
Pos Position at which to insert the other string (zero-based).
C Character to insert.
Returns:
Reference to itself.

csString& csString::Insert size_t  Pos,
const char *  Str
 

Insert another string into this one.

Parameters:
Pos Position at which to insert the other string (zero-based).
Str String to insert.
Returns:
Reference to itself.

csString& csString::Insert size_t  Pos,
const csString Str
 

Insert another string into this one.

Parameters:
Pos Position at which to insert the other string (zero-based).
Str String to insert.
Returns:
Reference to itself.

bool csString::IsEmpty  )  const [inline]
 

Check if string is empty.

Returns:
True if the string is empty; false if it is not.
Remarks:
This is rigidly equivalent to the expression 'Length() == 0'.

Definition at line 214 of file csstring.h.

size_t csString::Length  )  const [inline]
 

Query string length.

Returns:
The string length.
Remarks:
The returned length does not count the implicit null terminator.

Definition at line 206 of file csstring.h.

Referenced by Compare(), CompareNoCase(), and StartsWith().

csString& csString::LTrim  ) 
 

Trim leading whitespace.

Returns:
Reference to itself.
Remarks:
This is equivalent to Truncate(n) where 'n' is the last non-whitespace character, or zero if the string is composed entirely of whitespace.

void csString::Mug csString other  )  [protected]
 

Move the data pointer and associated info over from other.

csString::operator const char *  )  const [inline]
 

Get a pointer to the null-terminated character array.

Returns:
A C-string pointer to the null-terminated character array; or zero if the string represents a null-pointer.
Remarks:
See the class description for a discussion about how and when the string will represent a null-pointer.

Definition at line 843 of file csstring.h.

bool csString::operator!= const char *  Str  )  const [inline]
 

Check if another string is not equal to this one.

Parameters:
Str Other string.
Returns:
False if they are equal; true if not.
Remarks:
The comparison is case-sensitive.

Definition at line 916 of file csstring.h.

References Compare().

bool csString::operator!= const csString Str  )  const [inline]
 

Check if another string is not equal to this one.

Parameters:
Str Other string.
Returns:
False if they are equal; true if not.
Remarks:
The comparison is case-sensitive.

Definition at line 908 of file csstring.h.

References Compare().

csString csString::operator+ const csString iStr  )  const [inline]
 

Add another string to this one and return the result as a new string.

Definition at line 833 of file csstring.h.

References Append(), and Clone().

csString& csString::operator+= bool  s  )  [inline]
 

Append a formatted value to this string.

Definition at line 828 of file csstring.h.

csString& csString::operator+= double  s  )  [inline]
 

Append a formatted value to this string.

Definition at line 827 of file csstring.h.

csString& csString::operator+= float  s  )  [inline]
 

Append a formatted value to this string.

Definition at line 826 of file csstring.h.

csString& csString::operator+= unsigned long  s  )  [inline]
 

Append a formatted value to this string.

Definition at line 825 of file csstring.h.

csString& csString::operator+= long  s  )  [inline]
 

Append a formatted value to this string.

Definition at line 824 of file csstring.h.

csString& csString::operator+= unsigned int  s  )  [inline]
 

Append a formatted value to this string.

Definition at line 823 of file csstring.h.

csString& csString::operator+= int  s  )  [inline]
 

Append a formatted value to this string.

Definition at line 822 of file csstring.h.

csString& csString::operator+= unsigned short  s  )  [inline]
 

Append a formatted value to this string.

Definition at line 821 of file csstring.h.

csString& csString::operator+= short  s  )  [inline]
 

Append a formatted value to this string.

Definition at line 820 of file csstring.h.

csString& csString::operator+= unsigned char  s  )  [inline]
 

Append a formatted value to this string.

Definition at line 819 of file csstring.h.

csString& csString::operator+= char  s  )  [inline]
 

Append a formatted value to this string.

Definition at line 818 of file csstring.h.

csString& csString::operator+= const char *  s  )  [inline]
 

Append a formatted value to this string.

Definition at line 817 of file csstring.h.

csString& csString::operator+= const csString s  )  [inline]
 

Append a formatted value to this string.

Definition at line 816 of file csstring.h.

bool csString::operator< const char *  Str  )  const [inline]
 

Check if another string is less than this one.

Parameters:
Str Other string.
Returns:
True if the string is 'lesser' than Str, false otherwise.

Definition at line 878 of file csstring.h.

References GetDataSafe().

bool csString::operator< const csString Str  )  const [inline]
 

Check if another string is less than this one.

Parameters:
Str Other string.
Returns:
True if the string is 'lesser' than Str, false otherwise.

Definition at line 868 of file csstring.h.

References GetDataSafe().

const csString& csString::operator= bool  s  )  [inline]
 

Assign a formatted value to this string.

Definition at line 806 of file csstring.h.

References Append().

const csString& csString::operator= double  s  )  [inline]
 

Assign a formatted value to this string.

Definition at line 805 of file csstring.h.

const csString& csString::operator= float  s  )  [inline]
 

Assign a formatted value to this string.

Definition at line 804 of file csstring.h.

const csString& csString::operator= unsigned long  s  )  [inline]
 

Assign a formatted value to this string.

Definition at line 803 of file csstring.h.

const csString& csString::operator= long  s  )  [inline]
 

Assign a formatted value to this string.

Definition at line 802 of file csstring.h.

const csString& csString::operator= unsigned int  s  )  [inline]
 

Assign a formatted value to this string.

Definition at line 801 of file csstring.h.

const csString& csString::operator= int  s  )  [inline]
 

Assign a formatted value to this string.

Definition at line 800 of file csstring.h.

const csString& csString::operator= unsigned short  s  )  [inline]
 

Assign a formatted value to this string.

Definition at line 799 of file csstring.h.

const csString& csString::operator= short  s  )  [inline]
 

Assign a formatted value to this string.

Definition at line 798 of file csstring.h.

const csString& csString::operator= unsigned char  s  )  [inline]
 

Assign a formatted value to this string.

Definition at line 797 of file csstring.h.

const csString& csString::operator= char  s  )  [inline]
 

Assign a formatted value to this string.

Definition at line 796 of file csstring.h.

const csString& csString::operator= const char *  s  )  [inline]
 

Assign a formatted value to this string.

Definition at line 795 of file csstring.h.

const csString& csString::operator= const csString s  )  [inline]
 

Assign a formatted value to this string.

Definition at line 794 of file csstring.h.

bool csString::operator== const char *  Str  )  const [inline]
 

Check if another string is equal to this one.

Parameters:
Str Other string.
Returns:
True if they are equal; false if not.
Remarks:
The comparison is case-sensitive.

Definition at line 860 of file csstring.h.

References Compare().

bool csString::operator== const csString Str  )  const [inline]
 

Check if another string is equal to this one.

Parameters:
Str Other string.
Returns:
True if they are equal; false if not.
Remarks:
The comparison is case-sensitive.

Definition at line 852 of file csstring.h.

References Compare().

bool csString::operator> const char *  Str  )  const [inline]
 

Check to see if a string is greater than this one.

Parameters:
Str Other string.
Returns:
True if the string is 'greater' than Str, false otherwise.

Definition at line 898 of file csstring.h.

References GetDataSafe().

bool csString::operator> const csString Str  )  const [inline]
 

Check to see if a string is greater than this one.

Parameters:
Str Other string.
Returns:
True if the string is 'greater' than Str, false otherwise.

Definition at line 888 of file csstring.h.

References GetDataSafe().

char csString::operator[] size_t  n  )  const [inline]
 

Get n'th character.

Definition at line 225 of file csstring.h.

char& csString::operator[] size_t  n  )  [inline]
 

Get a modifiable reference to n'th character.

Definition at line 218 of file csstring.h.

csString& csString::Overwrite size_t  Pos,
const csString Str
 

Overlay another string onto a part of this string.

Parameters:
Pos Position at which to insert the other string (zero-based).
Str String which will be overlayed atop this string.
Returns:
Reference to itself.
Remarks:
The target string will grow as necessary to accept the new string.

csString csString::PadCenter bool  v,
size_t  iNewSize,
char  iChar = ' '
[static]
 

Return a new left+right padded string representation of a basic type.

csString csString::PadCenter double  v,
size_t  iNewSize,
char  iChar = ' '
[static]
 

Return a new left+right padded string representation of a basic type.

csString csString::PadCenter float  v,
size_t  iNewSize,
char  iChar = ' '
[static]
 

Return a new left+right padded string representation of a basic type.

csString csString::PadCenter unsigned long  v,
size_t  iNewSize,
char  iChar = ' '
[static]
 

Return a new left+right padded string representation of a basic type.

csString csString::PadCenter long  v,
size_t  iNewSize,
char  iChar = ' '
[static]
 

Return a new left+right padded string representation of a basic type.

csString csString::PadCenter unsigned int  v,
size_t  iNewSize,
char  iChar = ' '
[static]
 

Return a new left+right padded string representation of a basic type.

csString csString::PadCenter int  v,
size_t  iNewSize,
char  iChar = ' '
[static]
 

Return a new left+right padded string representation of a basic type.

csString csString::PadCenter unsigned short  v,
size_t  iNewSize,
char  iChar = ' '
[static]
 

Return a new left+right padded string representation of a basic type.

csString csString::PadCenter short  v,
size_t  iNewSize,
char  iChar = ' '
[static]
 

Return a new left+right padded string representation of a basic type.

csString csString::PadCenter unsigned char  v,
size_t  iNewSize,
char  iChar = ' '
[static]
 

Return a new left+right padded string representation of a basic type.

csString csString::PadCenter char  v,
size_t  iNewSize,
char  iChar = ' '
[static]
 

Return a new left+right padded string representation of a basic type.

csString csString::PadCenter const char *  v,
size_t  iNewSize,
char  iChar = ' '
[static]
 

Return a new left+right padded string representation of a basic type.

csString csString::PadCenter const csString v,
size_t  iNewSize,
char  iChar = ' '
[static]
 

Return a new left+right padded string representation of a basic type.

csString& csString::PadCenter size_t  NewSize,
char  PadChar = ' '
 

Pad to a specified size with leading and trailing characters so as to center the string.

Parameters:
NewSize Size to which the string should grow.
PadChar Character with which to pad the string (default is space).
Returns:
Reference to itself.
Remarks:
Never shortens the string. If NewSize is less than or equal to Length(), nothing happens. If the left and right sides can not be padded equally, then the right side will gain the extra one-character padding.

csString csString::PadLeft bool  v,
size_t  iNewSize,
char  iChar = ' '
[static]
 

Return a new left-padded string representation of a basic type.

csString csString::PadLeft double  v,
size_t  iNewSize,
char  iChar = ' '
[static]
 

Return a new left-padded string representation of a basic type.

csString csString::PadLeft float  v,
size_t  iNewSize,
char  iChar = ' '
[static]
 

Return a new left-padded string representation of a basic type.

csString csString::PadLeft unsigned long  v,
size_t  iNewSize,
char  iChar = ' '
[static]
 

Return a new left-padded string representation of a basic type.

csString csString::PadLeft long  v,
size_t  iNewSize,
char  iChar = ' '
[static]
 

Return a new left-padded string representation of a basic type.

csString csString::PadLeft unsigned int  v,
size_t  iNewSize,
char  iChar = ' '
[static]
 

Return a new left-padded string representation of a basic type.

csString csString::PadLeft int  v,
size_t  iNewSize,
char  iChar = ' '
[static]
 

Return a new left-padded string representation of a basic type.

csString csString::PadLeft unsigned short  v,
size_t  iNewSize,
char  iChar = ' '
[static]
 

Return a new left-padded string representation of a basic type.

csString csString::PadLeft short  v,
size_t  iNewSize,
char  iChar = ' '
[static]
 

Return a new left-padded string representation of a basic type.

csString csString::PadLeft unsigned char  v,
size_t  iNewSize,
char  iChar = ' '
[static]
 

Return a new left-padded string representation of a basic type.

csString csString::PadLeft char  v,
size_t  iNewSize,
char  iChar = ' '
[static]
 

Return a new left-padded string representation of a basic type.

csString csString::PadLeft const char *  v,
size_t  iNewSize,
char  iChar = ' '
[static]
 

Return a new left-padded string representation of a basic type.

csString csString::PadLeft const csString v,
size_t  iNewSize,
char  iChar = ' '
[static]
 

Return a new left-padded string representation of a basic type.

csString& csString::PadLeft size_t  NewSize,
char  PadChar = ' '
 

Pad to a specified size with leading characters.

Parameters:
NewSize Size to which the string should grow.
PadChar Character with which to pad the string (default is space).
Returns:
Reference to itself.
Remarks:
Never shortens the string. If NewSize is less than or equal to Length(), nothing happens.

csString csString::PadRight bool  v,
size_t  iNewSize,
char  iChar = ' '
[static]
 

Return a new right-padded string representation of a basic type.

csString csString::PadRight double  v,
size_t  iNewSize,
char  iChar = ' '
[static]
 

Return a new right-padded string representation of a basic type.

csString csString::PadRight float  v,
size_t  iNewSize,
char  iChar = ' '
[static]
 

Return a new right-padded string representation of a basic type.

csString csString::PadRight unsigned long  v,
size_t  iNewSize,
char  iChar = ' '
[static]
 

Return a new right-padded string representation of a basic type.

csString csString::PadRight long  v,
size_t  iNewSize,
char  iChar = ' '
[static]
 

Return a new right-padded string representation of a basic type.

csString csString::PadRight unsigned int  v,
size_t  iNewSize,
char  iChar = ' '
[static]
 

Return a new right-padded string representation of a basic type.

csString csString::PadRight int  v,
size_t  iNewSize,
char  iChar = ' '
[static]
 

Return a new right-padded string representation of a basic type.

csString csString::PadRight unsigned short  v,
size_t  iNewSize,
char  iChar = ' '
[static]
 

Return a new right-padded string representation of a basic type.

csString csString::PadRight short  v,
size_t  iNewSize,
char  iChar = ' '
[static]
 

Return a new right-padded string representation of a basic type.

csString csString::PadRight unsigned char  v,
size_t  iNewSize,
char  iChar = ' '
[static]
 

Return a new right-padded string representation of a basic type.

csString csString::PadRight char  v,
size_t  iNewSize,
char  iChar = ' '
[static]
 

Return a new right-padded string representation of a basic type.

csString csString::PadRight const char *  v,
size_t  iNewSize,
char  iChar = ' '
[static]
 

Return a new right-padded string representation of a basic type.

csString csString::PadRight const csString v,
size_t  iNewSize,
char  iChar = ' '
[static]
 

Return a new right-padded string representation of a basic type.

csString& csString::PadRight size_t  NewSize,
char  PadChar = ' '
 

Pad to a specified size with trailing characters.

Parameters:
NewSize Size to which the string should grow.
PadChar Character with which to pad the string (default is space).
Returns:
Reference to itself.
Remarks:
Never shortens the string. If NewSize is less than or equal to Length(), nothing happens.

csString& csString::Reclaim  ) 
 

Set string buffer capacity to hold exactly the current content.

Returns:
Reference to itself.
Remarks:
If the string length is greater than zero, then the buffer's capacity will be adjusted to exactly that size. If the string length is zero, then this is equivalent to an invocation of Free(), which means that GetData() and 'operator char const*' will return a null pointer after reclamation.

csString& csString::Replace bool  s  )  [inline]
 

Replace contents of this string with the value in formatted form.

Remarks:
Internally uses the various flavours of Append().

Definition at line 442 of file csstring.h.

csString& csString::Replace double  s  )  [inline]
 

Replace contents of this string with the value in formatted form.

Remarks:
Internally uses the various flavours of Append().

Definition at line 441 of file csstring.h.

csString& csString::Replace float  s  )  [inline]
 

Replace contents of this string with the value in formatted form.

Remarks:
Internally uses the various flavours of Append().

Definition at line 440 of file csstring.h.

csString& csString::Replace unsigned long  s  )  [inline]
 

Replace contents of this string with the value in formatted form.

Remarks:
Internally uses the various flavours of Append().

Definition at line 439 of file csstring.h.

csString& csString::Replace long  s  )  [inline]
 

Replace contents of this string with the value in formatted form.

Remarks:
Internally uses the various flavours of Append().

Definition at line 438 of file csstring.h.

csString& csString::Replace unsigned int  s  )  [inline]
 

Replace contents of this string with the value in formatted form.

Remarks:
Internally uses the various flavours of Append().

Definition at line 437 of file csstring.h.

csString& csString::Replace int  s  )  [inline]
 

Replace contents of this string with the value in formatted form.

Remarks:
Internally uses the various flavours of Append().

Definition at line 436 of file csstring.h.

csString& csString::Replace unsigned short  s  )  [inline]
 

Replace contents of this string with the value in formatted form.

Remarks:
Internally uses the various flavours of Append().

Definition at line 435 of file csstring.h.

csString& csString::Replace short  s  )  [inline]
 

Replace contents of this string with the value in formatted form.

Remarks:
Internally uses the various flavours of Append().

Definition at line 434 of file csstring.h.

csString& csString::Replace unsigned char  s  )  [inline]
 

Replace contents of this string with the value in formatted form.

Remarks:
Internally uses the various flavours of Append().

Definition at line 433 of file csstring.h.

csString& csString::Replace char  s  )  [inline]
 

Replace contents of this string with the value in formatted form.

Remarks:
Internally uses the various flavours of Append().

Definition at line 432 of file csstring.h.

csString& csString::Replace const char *  Str,
size_t  Count = (size_t)-1
 

Replace contents of this string with the contents of another.

Parameters:
Str String from which new content of this string will be copied.
Count Number of characters to copy. If (size_t)-1 is specified, then all characters will be copied.
Returns:
Reference to itself.
Remarks:
This string will represent a null-pointer after replacement if and only if Str is a null pointer.

csString& csString::Replace const csString Str,
size_t  Count = (size_t)-1
 

Replace contents of this string with the contents of another.

Parameters:
Str String from which new content of this string will be copied.
Count Number of characters to copy. If (size_t)-1 is specified, then all characters will be copied.
Returns:
Reference to itself.
Remarks:
This string will represent a null-pointer after replacement if and only if Str represents a null-pointer.

csString& csString::RTrim  ) 
 

Trim trailing whitespace.

Returns:
Reference to itself.
Remarks:
This is equivalent to DeleteAt(0,n) where 'n' is the first non-whitespace character, or Lenght() if the string is composed entirely of whitespace.

void csString::SetAt size_t  n,
const char  c
[inline]
 

Set the n'th character.

Remarks:
The n'th character position must be a valid position in the string. You can not expand the string by setting a character beyond the end of string.

Definition at line 237 of file csstring.h.

void csString::SetCapacity size_t  NewSize  ) 
 

Advise the string that it should allocate enough space to hold up to NewSize characters.

Remarks:
After calling this method, the string's capacity will be at least NewSize + 1 (one for the implicit null terminator). Never shrinks capacity. If you need to actually reclaim memory, then use Free() or Reclaim().

Referenced by csString().

void csString::SetGrowsBy size_t   ) 
 

Advise the string that it should grow by approximately this many bytes when more space is required.

Remarks:
This value is only a suggestion. The actual value by which it grows may be rounded up or down to an implementation-dependent allocation multiple. This method turns off exponential growth.

void csString::SetGrowsExponentially bool  b  )  [inline]
 

Tell the string to re-size its buffer exponentially as needed.

Remarks:
If set to true, the GetGrowsBy() setting is ignored.

Definition at line 112 of file csstring.h.

csString csString::Slice size_t  start,
size_t  len
const
 

Copy and return a portion of this string.

Parameters:
start Start position of slice (zero-based).
len Number of characters in slice.
Returns:
The indicated string slice.

bool csString::StartsWith const char *  iStr,
bool  ignore_case = false
const [inline]
 

Check if this string starts with a null-terminated C- string.

Parameters:
iStr Other string.
ignore_case Causes the comparison to be case insensitive if true.
Returns:
True if they are equal up to the length of iStr; false if not.

Definition at line 528 of file csstring.h.

References csStrNCaseCmp().

bool csString::StartsWith const csString iStr,
bool  ignore_case = false
const [inline]
 

Check if this string starts with another one.

Parameters:
iStr Other string.
ignore_case Causes the comparison to be case insensitive if true.
Returns:
True if they are equal up to the length of iStr; false if not.

Definition at line 506 of file csstring.h.

References csStrNCaseCmp(), GetData(), and Length().

void csString::SubString csString sub,
size_t  start,
size_t  len
const
 

Copy a portion of this string.

Parameters:
sub Strign which will receive the indicated substring copy.
start Start position of slice (zero-based).
len Number of characters in slice.
Remarks:
Use this method instead of Slice() for cases where you expect to extract many substrings in a tight loop, and want to avoid the overhead of allocation of a new string object for each operation. Simply re-use 'sub' for each operation.

csString& csString::Trim  ) 
 

Trim leading and trailing whitespace.

Returns:
Reference to itself.
Remarks:
This is equivalent to LTrim() followed by RTrim().

csString& csString::Truncate size_t  Len  ) 
 

Truncate the string.

Parameters:
Len The number of characters to which the string should be truncated (possibly 0).
Returns:
Reference to itself.
Remarks:
Will only make a string shorter; will never extend it. This method does not reclaim memory; it merely shortens the string, which means that Truncate(0) is a handy method of clearing the string, without the overhead of slow heap management. This may be important if you want to re-use the same string many times over. If you need to reclaim memory after truncating the string, then invoke Reclaim(). GetData() and 'operator char const*' will return a non-null zero-length string if you truncate the string to 0 characters, unless the string had already represented a null-pointer, in which case it will continue to represent a null-pointer after truncation.

Referenced by Clear().

csString& csString::Upcase  ) 
 

Convert this string to upper-case.

Returns:
Reference to itself.


The documentation for this class was generated from the following file:
Generated for Crystal Space by doxygen 1.3.9.1