![]() |
Public API Reference |
#include <string.h>
Inheritance diagram for iString:
Public Methods | |
virtual void | SetCapacity (size_t NewSize)=0 |
Advise the string that it should allocate enough space to hold up to NewSize characters. More... | |
virtual size_t | GetCapacity () const=0 |
Get string capacity. More... | |
virtual void | SetGrowsBy (size_t)=0 |
Advise the string that it should grow by approximately this many bytes when more space is required. More... | |
virtual size_t | GetGrowsBy () const=0 |
Get the allocation growth increment. More... | |
virtual void | SetGrowsExponentially (bool)=0 |
Tell the string to re-size its buffer exponentially as needed. More... | |
virtual bool | GetGrowsExponentially () const=0 |
Returns true if exponential growth is enabled. More... | |
virtual void | Truncate (size_t iPos)=0 |
Truncate the string. More... | |
virtual void | Reclaim ()=0 |
Set string maximal capacity to current string length. More... | |
void | Clear () |
Clear the string (so that it contains only ending 0 character). More... | |
virtual iString * | Clone () const=0 |
Get a copy of this string. More... | |
virtual char * | GetData () const=0 |
Get a pointer to ASCIIZ string. More... | |
virtual size_t | Length () const=0 |
Query string length. More... | |
bool | IsEmpty () const |
Check if string is empty. More... | |
virtual char & | operator[] (size_t iPos)=0 |
Get a reference to iPos'th character. More... | |
virtual void | SetAt (size_t iPos, char iChar)=0 |
Set characetr number iPos to iChar. More... | |
virtual char | GetAt (size_t iPos) const=0 |
Get character at position iPos. More... | |
virtual void | Insert (size_t iPos, iString *iStr)=0 |
Insert another string into this one at position iPos. More... | |
virtual void | Overwrite (size_t iPos, iString *iStr)=0 |
Overlay another string onto a part of this string. More... | |
virtual iString & | Append (const char *iStr, size_t iCount=(size_t)-1)=0 |
Append an ASCIIZ string to this one (up to iCount characters). More... | |
virtual iString & | Append (const iString *iStr, size_t iCount=(size_t)-1)=0 |
Append a string to this one (possibly iCount characters from the string). More... | |
virtual void | SubString (iString *sub, size_t start, size_t len)=0 |
SubString another string out of this one. More... | |
virtual size_t | FindFirst (const char c, size_t p=(size_t)-1)=0 |
If the character cannot be found, this function returns (size_t)-1. More... | |
virtual size_t | FindLast (const char c, size_t p=(size_t)-1)=0 |
If the character cannot be found, this function returns (size_t)-1. More... | |
virtual void | Format (const char *format,...)=0 |
Format this string using sprintf() formatting directives. More... | |
virtual void | FormatV (const char *format, va_list args)=0 |
Format this string using sprintf() formatting directives in a va_list. More... | |
virtual void | Replace (const iString *iStr, size_t iCount=(size_t)-1)=0 |
Replace contents of this string with the contents of another. More... | |
virtual bool | Compare (const iString *iStr) const=0 |
Check if two strings are equal. More... | |
virtual bool | CompareNoCase (const iString *iStr) const=0 |
Compare two strings ignoring case. More... | |
iString & | operator+= (const iString &iStr) |
Append another string to this. More... | |
iString & | operator+= (const char *iStr) |
Append an ASCIIZ to this string. More... | |
iString & | operator+ (const iString &iStr) const |
Concatenate two strings and return a third one. More... | |
operator const char * () const | |
Convert iString into ASCIIZ. More... | |
bool | operator== (const iString &iStr) const |
Check if two strings are equal. More... |
Definition at line 34 of file string.h.
|
Append a string to this one (possibly iCount characters from the string).
Implemented in scfString. |
|
Append an ASCIIZ string to this one (up to iCount characters).
Implemented in scfString. Referenced by operator+, and operator+=. |
|
Clear the string (so that it contains only ending 0 character).
Definition at line 73 of file string.h. References Truncate. |
|
Get a copy of this string.
Implemented in scfString. Referenced by operator+. |
|
Check if two strings are equal.
Implemented in scfString. Referenced by operator==. |
|
Compare two strings ignoring case.
Implemented in scfString. |
|
If the character cannot be found, this function returns (size_t)-1.
Implemented in scfString. |
|
If the character cannot be found, this function returns (size_t)-1.
Implemented in scfString. |
|
Format this string using sprintf() formatting directives. Automatically allocates sufficient memory to hold result. Newly formatted string overwrites previous string value. Implemented in scfString. |
|
Format this string using sprintf() formatting directives in a va_list. Automatically allocates sufficient memory to hold result. Newly formatted string overwrites previous string value. Implemented in scfString. |
|
Get character at position iPos.
Implemented in scfString. |
|
Get string capacity.
Implemented in scfString. |
|
Get a pointer to ASCIIZ string.
Implemented in scfString. Referenced by operator const char *. |
|
Get the allocation growth increment.
Implemented in scfString. |
|
Returns true if exponential growth is enabled.
Implemented in scfString. |
|
Insert another string into this one at position iPos.
Implemented in scfString. |
|
Check if string is empty.
Definition at line 86 of file string.h. References Length. |
|
Query string length.
Implemented in scfString. Referenced by IsEmpty. |
|
Convert iString into ASCIIZ.
Definition at line 163 of file string.h. References GetData. |
|
Concatenate two strings and return a third one.
|
|
Append an ASCIIZ to this string.
Definition at line 155 of file string.h. References Append. |
|
Append another string to this.
Definition at line 151 of file string.h. References Append. |
|
Check if two strings are equal.
Definition at line 167 of file string.h. References Compare. |
|
Get a reference to iPos'th character.
Implemented in scfString. |
|
Overlay another string onto a part of this string.
Implemented in scfString. |
|
Set string maximal capacity to current string length.
Implemented in scfString. |
|
Replace contents of this string with the contents of another.
Implemented in scfString. |
|
Set characetr number iPos to iChar.
Implemented in scfString. |
|
Advise the string that it should allocate enough space to hold up to NewSize characters. 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(). Implemented in scfString. |
|
Advise the string that it should grow by approximately this many bytes when more space is required. 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. Implemented in scfString. |
|
Tell the string to re-size its buffer exponentially as needed. If set to true, the GetGrowsBy() setting is ignored. Implemented in scfString. |
|
SubString another string out of this one. The result is placed in 'sub'. The substring is from 'start', of length 'len'. Implemented in scfString. |
|
Truncate the string.
Implemented in scfString. Referenced by Clear. |