#include <prom_options.hh>
Public Member Functions | |
| String (const String &other) | |
| String & | operator= (const String &other) |
| String | allCaps () const |
| bool | isWhite () const |
| bool | hasNonWhite () const |
| String | trimInitialWhitespace () const |
| String () | |
| String (char c) | |
| String (const char *str) | |
| String (const char *str, int len) | |
| const char * | cString () const |
| int | length () const |
| const char & | operator[] (int i) const |
| char & | operator[] (int i) |
| bool | operator== (const String &other) const |
| bool | operator!= (const String &other) const |
| bool | operator< (const String &other) const |
| String & | operator+= (const String &other) |
| String | operator+ (const String &other) const |
| String | operator+ (const int &x) const |
| String | operator+ (const double &x) const |
| bool | contains (char c) const |
| int | find (const char *sub) const |
| int | find (const String &sub) const |
| String | before (const char *sub) const |
| String | before (const String &sub) const |
| String | after (const char *sub) const |
| String | after (const String &sub) const |
| String | beforeToken (const String &tokens) const |
| String | between (const String &begin, const String &end, String &front, String &back) const |
| String | subString (int begin, int end) const |
| int | hashCode () const |
| String | toString () const |
| int | byteCount () const |
| int | atoi () const |
| double | atof () const |
| bool | atob () const |
Static Public Member Functions | |
| String | readFromStream (istream &is) |
Private Member Functions | |
| int | indexcheck (int i) const |
| int | init (const char *str, int n) |
Private Attributes | |
| char * | str_ |
Copy and assignment are deep. Memory is deleted upon a destructor call.
|
|
Create an empty string |
|
|
Create a null-terminated string with one character |
|
|
Create by copying a null-terminated C string |
|
||||||||||||
|
Create by copying a certain number of elements from a C string |
|
|
return the substring after the first occurance of a string |
|
|
return the substring after the first occurance of a string |
|
|
Bool value |
|
|
Double value |
|
|
Integer value |
|
|
return the substring before the first occurance of a string |
|
|
return the substring before the first occurance of a string |
|
|
return the string before the first occurance of one of the characters in the token string |
|
||||||||||||||||||||
|
return the substring between a beginning and ending delimiter. Return by reference the substrings before and after the beginning and ending delimiters. For example path = "abc(def)hij".between("(", ")", front, back) returns the string "def" and sets front and back to "abc" and "hij". |
|
|
get number of bytes in string |
|
|
decide if a string contains a character |
|
|
Access to pointer to C string. Use with care. |
|
|
Find the location of a substring, returning -1 if not found |
|
|
Find the location of a substring, returning -1 if not found |
|
|
Compute a hash code for the string |
|
|
return number of non-null characters |
|
|
Check inequality of contents |
|
|
Concatenation |
|
|
Concatenation |
|
|
Concatenation |
|
|
In-place concatenation |
|
|
Lexical less-than comparison |
|
|
Check equality of contents |
|
|
Read/Writer access |
|
|
Read-only access |
|
||||||||||||
|
grab a substring between two locations |
|
|
Return String form of object. |
1.3.7