CrystalSpace

Public API Reference

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

scfString Class Reference

This is a thin SCF wrapper around csString. More...

#include <scfstr.h>

Inheritance diagram for scfString:

iString iBase List of all members.

Public Methods

 scfString ()
 Create an empty scfString object. More...

 scfString (size_t iLength)
 Create an scfString object and reserve space for iLength characters. More...

 scfString (const iString &copy)
 Copy constructor. More...

 scfString (const char *copy)
 Yet another copy constructor. More...

virtual ~scfString ()
 Destroy a scfString object. More...

const csStringGetCsString () const
 Get the pointer to the internal csString. More...

csStringGetCsString ()
 Get the pointer to the internal csString. More...

virtual void SetCapacity (size_t NewSize)
 Set string capacity to NewSize characters. More...

virtual size_t GetCapacity () const
 Get string capacity. More...

virtual void SetGrowsBy (size_t)
 Set the allocation growth increment. More...

virtual size_t GetGrowsBy () const
 Get the allocation growth increment. More...

virtual void SetGrowsExponentially (bool)
 Set exponential allocation growth. Overrides SetGrowsBy(). More...

virtual bool GetGrowsExponentially () const
 Get exponential growth setting. More...

virtual void Truncate (size_t iPos)
 Truncate the string. More...

virtual void Reclaim ()
 Set string maximal capacity to current string length. More...

virtual iStringClone () const
 Get a copy of this string. More...

virtual char * GetData () const
 Get a pointer to ASCIIZ string. More...

virtual size_t Length () const
 Query string length. More...

virtual char & operator[] (size_t iPos)
 Get a reference to iPos'th character. More...

virtual void SetAt (size_t iPos, char iChar)
 Set characetr number iPos to iChar. More...

virtual char GetAt (size_t iPos) const
 Get character at position iPos. More...

virtual void Insert (size_t iPos, iString *iStr)
 Insert another string into this one at position iPos. More...

virtual void Overwrite (size_t iPos, iString *iStr)
 Overlay another string onto a part of this string. More...

virtual iStringAppend (const char *iStr, size_t iCount=(size_t)-1)
 Append an ASCIIZ string to this one (up to iCount characters). More...

virtual iStringAppend (const iString *iStr, size_t iCount=(size_t)-1)
 Append a string to this one (possibly iCount characters from the string). More...

virtual void SubString (iString *sub, size_t start, size_t len)
 SubString another string out of this one. More...

virtual size_t FindFirst (const char c, size_t p=(size_t)-1)
 Find first character 'c' from position 'p'. More...

virtual size_t FindLast (const char c, size_t p=(size_t)-1)
 Find first character 'c', counting backwards from position 'p'. More...

virtual void Format (const char *format,...)
 Format. More...

virtual void FormatV (const char *format, va_list args)
 Format. More...

virtual void Replace (const iString *iStr, size_t iCount=(size_t)-1)
 Replace contents of this string with the contents of another. More...

virtual bool Compare (const iString *iStr) const
 Check if two strings are equal. More...

virtual bool CompareNoCase (const iString *iStr) const
 Compare two strings ignoring case. More...


Detailed Description

This is a thin SCF wrapper around csString.

Definition at line 27 of file scfstr.h.


Constructor & Destructor Documentation

scfString::scfString   [inline]
 

Create an empty scfString object.

Definition at line 35 of file scfstr.h.

References SCF_CONSTRUCT_IBASE.

scfString::scfString size_t    iLength [inline]
 

Create an scfString object and reserve space for iLength characters.

Definition at line 39 of file scfstr.h.

References SCF_CONSTRUCT_IBASE.

scfString::scfString const iString   copy [inline]
 

Copy constructor.

Definition at line 43 of file scfstr.h.

References GetData, and SCF_CONSTRUCT_IBASE.

scfString::scfString const char *    copy [inline]
 

Yet another copy constructor.

Definition at line 47 of file scfstr.h.

References SCF_CONSTRUCT_IBASE.

virtual scfString::~scfString   [inline, virtual]
 

Destroy a scfString object.

Definition at line 51 of file scfstr.h.


Member Function Documentation

virtual iString& scfString::Append const iString   iStr,
size_t    iCount = (size_t)-1
[virtual]
 

Append a string to this one (possibly iCount characters from the string).

Implements iString.

virtual iString& scfString::Append const char *    iStr,
size_t    iCount = (size_t)-1
[virtual]
 

Append an ASCIIZ string to this one (up to iCount characters).

Implements iString.

virtual iString* scfString::Clone   const [virtual]
 

Get a copy of this string.

Implements iString.

virtual bool scfString::Compare const iString   iStr const [virtual]
 

Check if two strings are equal.

Implements iString.

virtual bool scfString::CompareNoCase const iString   iStr const [virtual]
 

Compare two strings ignoring case.

Implements iString.

virtual size_t scfString::FindFirst const char    c,
size_t    p = (size_t)-1
[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
[virtual]
 

Find first 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]
 

Format.

Implements iString.

virtual void scfString::FormatV const char *    format,
va_list    args
[virtual]
 

Format.

Implements iString.

virtual char scfString::GetAt size_t    iPos const [virtual]
 

Get character at position iPos.

Implements iString.

virtual size_t scfString::GetCapacity   const [virtual]
 

Get string capacity.

Implements iString.

csString& scfString::GetCsString   [inline]
 

Get the pointer to the internal csString.

Definition at line 57 of file scfstr.h.

const csString& scfString::GetCsString   const [inline]
 

Get the pointer to the internal csString.

Definition at line 54 of file scfstr.h.

virtual char* scfString::GetData   const [virtual]
 

Get a pointer to ASCIIZ string.

Implements iString.

Referenced by scfString.

virtual size_t scfString::GetGrowsBy   const [virtual]
 

Get the allocation growth increment.

Implements iString.

virtual bool scfString::GetGrowsExponentially   const [virtual]
 

Get exponential growth setting.

Implements iString.

virtual void scfString::Insert size_t    iPos,
iString   iStr
[virtual]
 

Insert another string into this one at position iPos.

Implements iString.

virtual size_t scfString::Length   const [virtual]
 

Query string length.

Implements iString.

virtual char& scfString::operator[] size_t    iPos [virtual]
 

Get a reference to iPos'th character.

Implements iString.

virtual void scfString::Overwrite size_t    iPos,
iString   iStr
[virtual]
 

Overlay another string onto a part of this string.

Implements iString.

virtual void scfString::Reclaim   [virtual]
 

Set string maximal capacity to current string length.

Implements iString.

virtual void scfString::Replace const iString   iStr,
size_t    iCount = (size_t)-1
[virtual]
 

Replace contents of this string with the contents of another.

Implements iString.

virtual void scfString::SetAt size_t    iPos,
char    iChar
[virtual]
 

Set characetr number iPos to iChar.

Implements iString.

virtual void scfString::SetCapacity size_t    NewSize [virtual]
 

Set string capacity to NewSize characters.

Implements iString.

virtual void scfString::SetGrowsBy size_t    [virtual]
 

Set the allocation growth increment.

Implements iString.

virtual void scfString::SetGrowsExponentially bool    [virtual]
 

Set exponential allocation growth. Overrides SetGrowsBy().

Implements iString.

virtual void scfString::SubString iString   sub,
size_t    start,
size_t    len
[virtual]
 

SubString another string out of this one.

The result is placed in 'sub'. The substring is from 'start', of length 'len'.

Implements iString.

virtual void scfString::Truncate size_t    iPos [virtual]
 

Truncate the string.

Implements iString.


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