scfString Class Reference
This is a thin SCF wrapper around csString. More...
#include <csutil/scfstr.h>
Inheritance diagram for scfString:
Public Member Functions | |
virtual void | Append (char c) |
Append a single character to this string. | |
virtual void | Append (iString const *iStr, size_t iCount=(size_t)-1) |
Append a string to this one (possibly iCount characters from the string). | |
virtual void | Append (const char *iStr, size_t iCount=(size_t)-1) |
Append an ASCIIZ string to this one (up to iCount characters). | |
virtual void | Clear () |
Clear the string (so that it contains only ending 0 character). | |
virtual csRef< iString > | Clone () const |
Get a copy of this string. | |
virtual bool | Compare (const iString *iStr) const |
Check if two strings are equal. | |
virtual bool | CompareNoCase (const iString *iStr) const |
Compare two strings ignoring case. | |
virtual void | Downcase () |
Convert string to lowercase. | |
virtual void | Empty () |
Clear the string (so that it contains only ending 0 character). | |
virtual size_t | Find (const char *search, size_t pos=0) const |
Find the first occurrence of search in this string starting at pos . | |
virtual size_t | FindFirst (const char c, size_t p=(size_t)-1) const |
Find first character 'c' from position 'p'. | |
virtual size_t | FindLast (const char c, size_t p=(size_t)-1) const |
Find last character 'c', counting backwards from position 'p'. | |
virtual void | Format (const char *format,...) |
Format. | |
virtual void | FormatV (const char *format, va_list args) |
Format. | |
virtual char | GetAt (size_t iPos) const |
Get character at position iPos. | |
virtual size_t | GetCapacity () const |
Get string capacity. | |
csString & | GetCsString () |
Get the pointer to the internal csString. | |
const csString & | GetCsString () const |
Get the pointer to the internal csString. | |
virtual char * | GetData () |
Get a pointer to null-terminated character data. | |
virtual char const * | GetData () const |
Get a pointer to null-terminated character data. | |
virtual size_t | GetGrowsBy () const |
Get the allocation growth increment. | |
virtual void | Insert (size_t iPos, iString const *iStr) |
Insert another string into this one at position iPos. | |
virtual bool | IsEmpty () const |
Check if string is empty. | |
virtual size_t | Length () const |
Query string length. | |
virtual | operator char const * () const |
Get the null-terminated C string represented by this iString. | |
virtual bool | operator!= (const iString &iStr) const |
Check if two strings are not equal. | |
virtual csRef< iString > | operator+ (const iString &iStr) const |
Concatenate two strings and return a third one. | |
virtual void | operator+= (char c) |
Append a single character to this string. | |
virtual void | operator+= (const char *iStr) |
Append a null-terminated string to this string. | |
virtual void | operator+= (const iString &iStr) |
Append another string to this. | |
virtual bool | operator== (const iString &iStr) const |
Check if two strings are equal. | |
virtual char | operator[] (size_t iPos) const |
Get the iPos'th character. | |
virtual char & | operator[] (size_t iPos) |
Get a reference to iPos'th character. | |
virtual void | Overwrite (size_t iPos, iString const *iStr) |
Overlay another string onto a part of this string. | |
virtual void | Reclaim () |
Set string maximal capacity to current string length. | |
virtual void | Replace (const char *iStr, size_t iCount=(size_t)-1) |
Replace contents of this string with the contents of another. | |
virtual void | Replace (const iString *iStr, size_t iCount=(size_t)-1) |
Replace contents of this string with the contents of another. | |
virtual void | ReplaceAll (const char *search, const char *replacement) |
Find all occurrences of search in this string and replace them with replacement . | |
virtual csRef< iString > | ReverseSlice (size_t start, size_t len=(size_t)-1) const |
Copy and return a portion of this string. | |
virtual void | ReverseSubString (iString *sub, size_t start=0, size_t len=(size_t)-1) const |
Copy a portion of this string. | |
scfString (const char *copy) | |
Yet another copy constructor. | |
scfString (const iString ©) | |
Copy constructor. | |
scfString (size_t iLength) | |
Create an scfString object and reserve space for iLength characters. | |
scfString () | |
Create an empty scfString object. | |
virtual void | SetAt (size_t iPos, char iChar) |
Set character number iPos to iChar. | |
virtual void | SetCapacity (size_t NewSize) |
Set string capacity to NewSize characters. | |
virtual void | SetGrowsBy (size_t) |
Set the allocation growth increment. | |
virtual void | ShrinkBestFit () |
Set string maximal capacity to current string length. | |
virtual csRef< iString > | Slice (size_t start=0, size_t len=(size_t)-1) const |
Copy and return a portion of this string. | |
virtual void | SubString (iString *sub, size_t start, size_t len=(size_t)-1) const |
Copy a portion of this string. | |
virtual void | Truncate (size_t iPos) |
Truncate the string. | |
virtual void | Upcase () |
Convert string to uppercase. | |
virtual | ~scfString () |
Destroy a scfString object. |
Detailed Description
This is a thin SCF wrapper around csString.
Definition at line 36 of file scfstr.h.
Constructor & Destructor Documentation
scfString::scfString | ( | ) | [inline] |
scfString::scfString | ( | size_t | iLength | ) | [inline] |
scfString::scfString | ( | const iString & | copy | ) | [inline] |
scfString::scfString | ( | const char * | copy | ) | [inline] |
virtual scfString::~scfString | ( | ) | [inline, virtual] |
Member Function Documentation
virtual void scfString::Append | ( | char | c | ) | [virtual] |
Append a single character to this string.
virtual void scfString::Append | ( | iString const * | iStr, | |
size_t | iCount = (size_t)-1 | |||
) | [virtual] |
virtual void scfString::Append | ( | const char * | iStr, | |
size_t | iCount = (size_t)-1 | |||
) | [virtual] |
virtual void scfString::Clear | ( | ) | [inline, virtual] |
Clear the string (so that it contains only ending 0 character).
- Deprecated:
- Use Empty() instead.
Implements iString.
virtual bool scfString::Compare | ( | const iString * | iStr | ) | const [virtual] |
virtual bool scfString::CompareNoCase | ( | const iString * | iStr | ) | const [virtual] |
virtual void scfString::Downcase | ( | ) | [virtual] |
virtual void scfString::Empty | ( | ) | [virtual] |
virtual size_t scfString::Find | ( | const char * | search, | |
size_t | pos = 0 | |||
) | const [virtual] |
Find the first occurrence of search
in this string starting at pos
.
- Parameters:
-
search String to locate. pos Start position of search (default 0).
- Returns:
- First position of
search
, or (size_t)-1 if not found.
Implements iString.
virtual size_t scfString::FindFirst | ( | const char | c, | |
size_t | p = (size_t)-1 | |||
) | const [virtual] |
Find first character 'c' from position 'p'.
If the character cannot be found, this function returns (size_t)-1
Implements iString.
virtual size_t scfString::FindLast | ( | const char | c, | |
size_t | p = (size_t)-1 | |||
) | const [virtual] |
Find last character 'c', counting backwards from position 'p'.
Default position is the end of the string. If the character cannot be found, this function returns (size_t)-1
Implements iString.
virtual void scfString::Format | ( | const char * | format, | |
... | ||||
) | [virtual] |
virtual void scfString::FormatV | ( | const char * | format, | |
va_list | args | |||
) | [virtual] |
virtual char scfString::GetAt | ( | size_t | iPos | ) | const [virtual] |
virtual size_t scfString::GetCapacity | ( | ) | const [virtual] |
csString& scfString::GetCsString | ( | ) | [inline] |
const csString& scfString::GetCsString | ( | ) | const [inline] |
Get the pointer to the internal csString.
Definition at line 68 of file scfstr.h.
Referenced by csKDTree::Dump(), and csKDTree::StateTest().
virtual char* scfString::GetData | ( | ) | [virtual] |
virtual char const* scfString::GetData | ( | ) | const [virtual] |
virtual size_t scfString::GetGrowsBy | ( | ) | const [virtual] |
virtual void scfString::Insert | ( | size_t | iPos, | |
iString const * | iStr | |||
) | [virtual] |
virtual bool scfString::IsEmpty | ( | ) | const [virtual] |
virtual size_t scfString::Length | ( | ) | const [virtual] |
virtual scfString::operator char const * | ( | ) | const [virtual] |
virtual bool scfString::operator!= | ( | const iString & | iStr | ) | const [virtual] |
virtual void scfString::operator+= | ( | char | c | ) | [virtual] |
Append a single character to this string.
virtual void scfString::operator+= | ( | const char * | iStr | ) | [virtual] |
virtual void scfString::operator+= | ( | const iString & | iStr | ) | [virtual] |
virtual bool scfString::operator== | ( | const iString & | iStr | ) | const [virtual] |
virtual char scfString::operator[] | ( | size_t | iPos | ) | const [virtual] |
virtual char& scfString::operator[] | ( | size_t | iPos | ) | [virtual] |
virtual void scfString::Overwrite | ( | size_t | iPos, | |
iString const * | iStr | |||
) | [virtual] |
virtual void scfString::Reclaim | ( | ) | [inline, virtual] |
Set string maximal capacity to current string length.
- Deprecated:
- Use ShrinkBestFit() instead.
Implements iString.
virtual void scfString::Replace | ( | const char * | iStr, | |
size_t | iCount = (size_t)-1 | |||
) | [virtual] |
virtual void scfString::Replace | ( | const iString * | iStr, | |
size_t | iCount = (size_t)-1 | |||
) | [virtual] |
virtual void scfString::ReplaceAll | ( | const char * | search, | |
const char * | replacement | |||
) | [virtual] |
Find all occurrences of search
in this string and replace them with replacement
.
Implements iString.
virtual csRef<iString> scfString::ReverseSlice | ( | size_t | start, | |
size_t | len = (size_t)-1 | |||
) | const [virtual] |
Copy and return a portion of this string.
This version differs from Slice() in that the 'start' parameter is counted from the END of the string rather than the beginning. The substring runs from `start' for `len' characters. If 'len' is omitted, a copy of the string containing all characters after (and including) start is returned.
virtual void scfString::ReverseSubString | ( | iString * | sub, | |
size_t | start = 0 , |
|||
size_t | len = (size_t)-1 | |||
) | const [virtual] |
Copy a portion of this string.
This version differs from SubString() in that the 'start' parameters is counted from the END of the string rather than the beginning. The result is placed in 'sub'. The substring is from 'start', of length 'len'. If 'start' and 'len' are omitted, a copy of the whole string is returned. If 'len' is omitted, a copy of the string containing all characters after (and including) 'start' is returned.
virtual void scfString::SetAt | ( | size_t | iPos, | |
char | iChar | |||
) | [virtual] |
virtual void scfString::SetCapacity | ( | size_t | NewSize | ) | [virtual] |
virtual void scfString::SetGrowsBy | ( | size_t | ) | [virtual] |
virtual void scfString::ShrinkBestFit | ( | ) | [virtual] |
virtual csRef<iString> scfString::Slice | ( | size_t | start = 0 , |
|
size_t | len = (size_t)-1 | |||
) | const [virtual] |
Copy and return a portion of this string.
The substring runs from `start' for `len' characters. If 'start' and 'len' are omitted, a copy of the whole string is returned. If 'len' is omitted, a copy of the string containing all characters after (and including) start is returned.
Implements iString.
virtual void scfString::SubString | ( | iString * | sub, | |
size_t | start, | |||
size_t | len = (size_t)-1 | |||
) | const [virtual] |
Copy a portion of this string.
The result is placed in 'sub'. The substring is from 'start', of length 'len'. If 'len' is omitted, a copy of the string containing all characters after (and including) 'start' is returned.
Implements iString.
virtual void scfString::Truncate | ( | size_t | iPos | ) | [virtual] |
virtual void scfString::Upcase | ( | ) | [virtual] |
The documentation for this class was generated from the following file:
- csutil/scfstr.h
Generated for Crystal Space by doxygen 1.4.7