#include <skAsciiString.h>
Public Member Functions | |
| skAsciiString () | |
| Default Constructor - constructs a blank string. | |
| skAsciiString (const char *) | |
| Constructor - from a null-terminated c-string. | |
| skAsciiString (const skAsciiString &) | |
| Copy Constructor. | |
| skAsciiString (const char *buffer, USize len) | |
| Constructor - from a non null-terminated buffer. | |
| skAsciiString (const char repeatchar, USize len) | |
| Constructor - a repeated list of characters. | |
| virtual | ~skAsciiString () |
| Destructor. | |
| skAsciiString & | operator= (const skAsciiString &) |
| Assignment operator - increments reference count of underlying P_String object. | |
| skAsciiString & | operator= (const char *) |
| Assignment operator - dereferences the P_String object and makes a new one by copying the given buffer. | |
| bool | operator< (const skAsciiString &) const |
| Comparison operator. | |
| bool | operator== (const skAsciiString &) const |
| Equality operator. | |
| bool | operator== (const char *) const |
| Equality operator. | |
| bool | operator!= (const skAsciiString &) const |
| Inequality operator. | |
| bool | operator!= (const char *) const |
| Inequality operator. | |
| operator const char * () const | |
| Conversion operator. | |
| const char * | c_str () const |
| Accesses underlying buffer. | |
| USize | hash () const |
| Returns a hash value for this string. | |
| char | at (USize index) const |
| Returns a character within the string. | |
| skAsciiString | substr (USize start, USize length) const |
| Returns a substring of this string. | |
| skAsciiString | substr (USize start) const |
| Returns the substring from the start up to the end of the current string. | |
| skAsciiString | operator+ (const skAsciiString &) const |
| Addition operator. | |
| skAsciiString & | operator+= (const skAsciiString &) |
| Increment operator - dereferences the P_String object, and replaces it with the concatenation of this string and the other one. | |
| USize | length () const |
| Length of the string. | |
| int | indexOf (const skAsciiString &s) const |
| returns the index of the first occurrence of the given string within the string | |
| int | indexOf (char c) const |
| returns the index of the first occurrence of the given character within the string | |
| int | indexOfLast (char c) const |
| returns the index of the last occurrence of the given character within the string | |
| int | to () const |
| Converts the string to an integer. | |
| float | toFloat () const |
| Converts the string to a float. | |
| skAsciiString | ltrim () const |
| returns a version of this string with leading blanks removed | |
Static Public Member Functions | |
| skAsciiString | literal (const char *) |
| Constructs a string from static string - the static string is *not* copied. | |
| skAsciiString | from (int) |
| Constructs a string from a signed integer. | |
| skAsciiString | from (USize) |
| Constructs a string from an unsigned integer. | |
| skAsciiString | from (float) |
| Constructs a string from a float. | |
| skAsciiString | from (char ch) |
| Constructs a string from a character. | |
| skAsciiString | fromBuffer (char *buffer) |
| Constructs a string from a buffer, which is *not* copied. | |
Protected Member Functions | |
| skAsciiString (P_AsciiString *) | |
| Constructor - internal taking a P_String and not copying it. | |
| skAsciiString (const char *s, int) | |
| Constructor - internal, taking a buffer and not copying it. | |
| void | assign (const 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_AsciiString * | pimp |
| The underlying string object. | |
|
|
Constructor - from a null-terminated c-string.
|
|
||||||||||||
|
Constructor - from a non null-terminated buffer.
|
|
||||||||||||
|
Constructor - a repeated list of characters.
|
|
||||||||||||
|
Constructor - internal, taking a buffer and not copying it.
|
|
|
Returns a character within the string.
|
|
|
Accesses underlying buffer.
|
|
|
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
|
|
|
returns the index of the first occurrence of the given string within the string
|
|
|
returns the index of the last occurrence of the given character within the string
|
|
|
Length of the string.
|
|
|
Conversion 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.
|
|
|
Assignment operator - dereferences the P_String object and makes a new one by copying the given buffer.
|
|
|
Assignment operator - increments reference count of underlying P_String object.
|
|
|
Equality operator.
|
|
|
Equality operator.
|
|
|
Returns the substring from the start up to the end of the current string.
|
|
||||||||||||
|
Returns a substring of this string.
|
1.3