|
| | SString () |
| | Create an empty streamable string ready for input.
|
| |
| | SString (const SString &from) |
| | Copy constructor.
|
| |
| | ~SString () |
| | Cancel out the object.
|
| |
| | String () |
| | Construct an empty string.
|
| |
| | String (const String &original) |
| | Copy constructor.
|
| |
| | String (const char *str) |
| | Create a string from a cstring.
|
| |
| | String (std::string string) |
| | Create a String from std::string.
|
| |
| | String (const String &str, size_t offset, size_t len=npos) |
| | Create a new string from a subset of another string.
|
| |
| | String (size_t size, const char *format,...) |
| | Create a string from formatted text input.
|
| |
| | String (size_t count, const char fill=' ') |
| | Fill a new string with character data.
|
| |
| virtual | ~String () |
| | Destroy the string...
|
| |
| const char * | getIndex (size_t index) const |
| | Get a string pointer to string content based on an indexed offset.
|
| |
| char * | getText (void) const |
| | Get the text of a string.
|
| |
| long | getValue (long defvalue=0l) const |
| | Get the value of a string.
|
| |
| bool | getBool (bool defbool=false) const |
| | Get the bool flag of a string.
|
| |
| const size_t | getLength (void) const |
| | Get the assigned length of string.
|
| |
| const size_t | getSize (void) const |
| | Get the allocation size of the string variable.
|
| |
| bool | isEmpty (void) const |
| | Return true if string is empty.
|
| |
| void | resize (size_t size) |
| | Re-allocate buffer space for string.
|
| |
| void | clear (void) |
| | Clear the contents of the entire string.
|
| |
| char | at (ssize_t offset) const |
| | Return a character at a known offset.
|
| |
| unsigned | count (const String &s, size_t offset=0) const |
| | Count the number of occurences of a specific string within our string.
|
| |
| unsigned | count (const char *s, size_t offset=0, size_t len=0) const |
| | Count the number of occurrences of a specific text pattern within our string.
|
| |
| String | token (const char *delim=" \t\n\r", size_t offset=0) |
| | Extract a new string as a token from the current string.
|
| |
| size_t | find (const String &s, size_t offset=0, unsigned instance=1) const |
| | Find the index to the nth instance of a substring in our string.
|
| |
| size_t | rfind (const String &s, size_t offset=0) const |
| | Find last occurence of a substring in our string.
|
| |
| size_t | find (const char *s, size_t offset=0, size_t len=0, unsigned count=1) const |
| | Find the index to the nth instance of text in our string.
|
| |
| size_t | rfind (const char *s, size_t offset=0, size_t len=0) const |
| | Find last occurence of a text in our string.
|
| |
| void | trim (const char *cs) |
| | Trim trailing characters from a string.
|
| |
| void | chop (const char *cs) |
| | Chop leading characters from a string.
|
| |
| void | strip (const char *cs) |
| | Strip lead and trailing characters from a string.
|
| |
| void | chop (size_t chars) |
| | Chop n leading characters from a string.
|
| |
| void | trim (size_t count) |
| | Trim n trailing characters from a string.
|
| |
| void | erase (size_t start, size_t len=npos) |
| | Erase a portion of string.
|
| |
| void | insert (size_t start, const char *text, size_t len=0) |
| | Insert text into a string.
|
| |
| void | insert (size_t start, const String &str) |
| | Insert other string into our string.
|
| |
| void | replace (size_t start, size_t len, const char *text, size_t count=0) |
| | Replace text at a specific position in the string with new text.
|
| |
| void | replace (size_t start, size_t len, const String &string) |
| | Replace text at a specific position in the string with new string,.
|
| |
| size_t | find (unsigned instance, const char *text, size_t offset=0, size_t len=0) const |
| | A more convenient version of find for nth occurences, by putting the instance first.
|
| |
| size_t | find (unsigned instance, const String &string, size_t offset=0) const |
| | A more convenient version of find for nth occurences, by putting the instance first.
|
| |
| String | substr (size_t start, size_t len) const |
| | Return a new string that contains a specific substring of the current string.
|
| |
| const char * | index (size_t ind) const |
| | Return an indexed string based on the index, such as from a find.
|
| |
| void | compact (void) |
| | Reduce the size of the string allocation to the minimum needed based on the current effective length.
|
| |
| char * | c_str (void) const |
| | Old ANSI C++ compatible string pointer extraction.
|
| |
| | operator char * () const |
| | Get our string data through dereference operator.
|
| |
| bool | operator! (void) const |
| | Logical test for string empty.
|
| |
| char * | text (void) const |
| | Alternate get text method.
|
| |
| char * | data (void) const |
| | Alternate get text method.
|
| |
| size_t | length (void) const |
| | Get length as if null terminated string.
|
| |
| size_t | size (void) const |
| | Get actual length of string data.
|
| |
| size_t | capacity (void) const |
| | Get space allocated to hold current string.
|
| |
| bool | empty (void) const |
| | Return true if string is empty.
|
| |
| void | append (const char *str, size_t count=0) |
| | Append text to the end of the current string.
|
| |
| void | append (size_t size, const char *format,...) |
| | Append formatted text to the end of the current string.
|
| |
| void | append (const char *str, size_t offset, size_t count) |
| | Append text into the current string.
|
| |
| void | add (char c) |
| | Add a character to the end of a string.
|
| |
| void | append (const String &str) |
| | Append string to the end of the current string.
|
| |
| const char | operator[] (unsigned ind) const |
| | Extract a character by array indexing.
|
| |
| const char * | operator= (const char *str) |
| | Assign our string for c string.
|
| |
| String & | operator+= (const String &str) |
| | Append operator.
|
| |
| String & | operator+= (char c) |
| | Append operator.
|
| |
| String & | operator+= (const char *str) |
| | Append operator.
|
| |
| String & | operator+= (const std::string &str) |
| | Append operator.
|
| |
| bool | operator< (const String &str) const |
| |
| bool | operator< (const char *str) const |
| |
| bool | operator> (const String &str) const |
| |
| bool | operator> (const char *str) const |
| |
| bool | operator<= (const String &str) const |
| |
| bool | operator<= (const char *str) const |
| |
| bool | operator>= (const String &str) const |
| |
| bool | operator>= (const char *str) const |
| |
| bool | operator== (const String &str) const |
| |
| bool | operator== (const char *str) const |
| |
| bool | operator!= (const String &str) const |
| |
| bool | operator!= (const char *str) const |
| |
| String & | operator+= (int i) |
| | Append operator.
|
| |
| String & | operator+= (unsigned int i) |
| |
| String & | operator+= (long l) |
| |
| String & | operator+= (unsigned long l) |
| |
| String & | operator+= (float f) |
| |
| String & | operator+= (double d) |
| |
| String & | operator+= (short s) |
| |
| String & | operator+= (unsigned short s) |
| |
| String & | operator= (int i) |
| | Assignment operator.
|
| |
| String & | operator= (unsigned int i) |
| |
| String & | operator= (long l) |
| |
| String & | operator= (unsigned long l) |
| |
| String & | operator= (float f) |
| |
| String & | operator= (double d) |
| |
| String & | operator= (short s) |
| |
| String & | operator= (unsigned short s) |
| |
| String & | operator= (const String &original) |
| |
| bool | operator*= (const String &str) const |
| | Test if string is contained in our string.
|
| |
| bool | operator*= (const char *str) const |
| | Test if text is contained in our string.
|
| |