#include <skString.h>
Public Methods | |
skString () | |
Default Constructor - constructs a blank string. | |
skString (const char *) | |
Constructor - from a null-terminated c-string. | |
skString (const unsigned char *) | |
Constructor - from a null-terminated c-string. | |
skString (const skString&) | |
Copy Constructor. | |
skString (const unsigned char * buffer, USize len) | |
Constructor - from a non null-terminated buffer. More... | |
skString (const unsigned char repeatChar, USize len) | |
Constructor - a repeated list of characters. More... | |
virtual | ~skString () |
Destructor. | |
skString& | operator= (const skString&) |
Assignment operator - increments reference count of underlying P_String object. | |
skString& | operator= (const unsigned char *) |
Assignment operator - dereferences the P_String object and makes a new one by copying the given buffer. | |
skString& | operator= (const char *) |
Assignment operator - dereferences the P_String object and makes a new one by copying the given buffer. | |
bool | operator< (const skString&) const |
Comparison operator. More... | |
bool | operator== (const skString&) const |
Equality operator. More... | |
bool | operator== (const unsigned char *) const |
Equality operator. More... | |
bool | operator== (const char *) const |
Equality operator. More... | |
bool | operator!= (const skString&) const |
Inequality operator. More... | |
bool | operator!= (const char *) const |
Inequality operator. More... | |
bool | operator!= (const unsigned char *) const |
Inequality operator. More... | |
operator const unsigned char * () const | |
Conversion operator. More... | |
operator const char * () const | |
Conversion operator. More... | |
USize | hash () const |
Returns a hash value for this string. | |
unsigned char | at (USize index) const |
Returns a character within the string. More... | |
skString | substr (USize start,USize length) const |
Returns a substring of this string. More... | |
skString | substr (USize start) const |
Returns the substring from the start up to the end of the current string. More... | |
skString | operator+ (const skString&) const |
Addition operator. More... | |
skString& | operator+= (const skString&) |
Increment operator - dereferences the P_String object, and replaces it with the concatenation of this string and the other one. More... | |
USize | length () const |
Length of the string. More... | |
int | indexOf (char c) |
returns the index of the first occurrence of the given character within the string. More... | |
int | to () const |
Converts the string to an integer. | |
float | toFloat () const |
Converts the string to a float. | |
Static Public Methods | |
skString | literal (const char *) |
Constructs a string from static string - the static string is *not* copied. | |
skString | from (int) |
Constructs a string from a signed integer. | |
skString | from (USize) |
Constructs a string from an unsigned integer. | |
skString | from (float) |
Constructs a string from a float. | |
skString | from (unsigned char ch) |
Constructs a string from a character. | |
skString | fromBuffer (unsigned char * buffer) |
Constructs a string from a buffer, which is *not* copied. More... | |
Protected Methods | |
skString (P_String *) | |
Constructor - internal taking a P_String and not copying it. | |
skString (const unsigned char * s,int) | |
Constructor - internal, taking a buffer and not copying it. | |
void | assign (const unsigned char *,int len=0) |
Assigns another buffer to this one, and copies it. | |
void | deRef () |
Dereferences the P_String object, deleting it if the reference count is zero. | |
Protected Attributes | |
P_String* | pimp |
The underlying string object. |
|
Constructor - from a non null-terminated buffer.
|
|
Constructor - a repeated list of characters.
|
|
Returns a character within the string.
|
|
Constructs a string from a buffer, which is *not* copied. The string will delete the buffer when the reference count reaches zero |
|
returns the index of the first occurrence of the given character within the string.
|
|
Length of the string.
|
|
Conversion operator.
|
|
Conversion operator.
|
|
Inequality operator.
|
|
Inequality operator.
|
|
Inequality operator.
|
|
Addition operator.
|
|
Increment operator - dereferences the P_String object, and replaces it with the concatenation of this string and the other one.
|
|
Comparison operator.
|
|
Equality operator.
|
|
Equality operator.
|
|
Equality operator.
|
|
Returns the substring from the start up to the end of the current string.
|
|
Returns a substring of this string.
|