Public Member Functions |
| | String () |
| | Constructs an empty string, i.e., a string with length 0.
|
| | String (const char c) |
| | Constructs a string consisting of a single character c.
|
| | String (const char *str) |
| | Constructs a string that is a copy of str.
|
| | String (size_t maxLen, const char *str) |
| | Constructs a string consisting of the first maxLen characters of str.
|
| | String (const String &str) |
| | Constructs a string that is a copy of str.
|
| | ~String () |
| const char * | cstr () const |
| | Cast a string into a 0-terminated C++ string.
|
| size_t | length () const |
| | Returns the length of the string.
|
| String & | operator+= (const String &str) |
| | Appends string str to this string.
|
| String & | operator= (const String &str) |
| | Assignment operator.
|
| String & | operator= (const char *str) |
| | Assignment operator.
|
| char & | operator[] (size_t i) |
| | Returns a reference to the character at position i.
|
| const char & | operator[] (size_t i) const |
| | Returns a reference to the character at position i.
|
| void | sprintf (const char *format,...) |
| | Formatted assignment operator.
|
Friends |
| bool | operator!= (const String &x, const String &y) |
| | Inequality operator.
|
| bool | operator!= (const char *x, const String &y) |
| | Inequality operator.
|
| bool | operator!= (const String &x, const char *y) |
| | Inequality operator.
|
| bool | operator< (const String &x, const String &y) |
| | Less than operator.
|
| bool | operator< (const char *x, const String &y) |
| | Less than operator.
|
| bool | operator< (const String &x, const char *y) |
| | Less than operator.
|
| bool | operator<= (const String &x, const String &y) |
| | Less or equal than operator.
|
| bool | operator<= (const char *x, const String &y) |
| | Less or equal than operator.
|
| bool | operator<= (const String &x, const char *y) |
| | Less or equal than operator.
|
| bool | operator== (const String &x, const String &y) |
| | Equality operator.
|
| bool | operator== (const char *x, const String &y) |
| | Equality operator.
|
| bool | operator== (const String &x, const char *y) |
| | Equality operator.
|
| bool | operator> (const String &x, const String &y) |
| | Greater than operator.
|
| bool | operator> (const char *x, const String &y) |
| | Greater than operator.
|
| bool | operator> (const String &x, const char *y) |
| | Greater than operator.
|
| bool | operator>= (const String &x, const String &y) |
| | Greater or equal than operator.
|
| bool | operator>= (const char *x, const String &y) |
| | Greater or equal than operator.
|
| bool | operator>= (const String &x, const char *y) |
| | Greater or equal than operator.
|
| istream & | operator>> (istream &is, String &str) |
| | Input operator.
|
Representation of character strings.
Strings are internally stored as an Ascii character array. The positions within a string a numbered 0,1,...
Definition at line 67 of file String.h.