RNBO: RNBO::String Class Reference
A string implementation without C++ standard library dependencies. More...
#include <RNBO_String.h>
Public Member Functions | |
String () | |
Construct a new String object. | |
String (const char *str) | |
Copy-construct a new String object. More... | |
String (String const &str) | |
Copy-construct a new String object. More... | |
~String () | |
Destroy the String object. | |
size_t | len () const |
Get the length of the String. More... | |
void | clear () |
Clear the contents of the String. | |
bool | empty () const |
Get whether the String is empty. More... | |
void | append (const char *astr) |
Append additional characters to the end of the String. More... | |
void | append (String &astr) |
Append a String to this String. More... | |
const char * | c_str () const |
Get the String's underlying null-terminated string. More... | |
String & | operator= (const String &origin) |
Copy-assignment operator. More... | |
String & | operator= (const char *origin) |
Copy-assignment operator. More... | |
String & | operator+= (const String &origin) |
Addition assignment operator. More... | |
String & | operator+= (const char *origin) |
Addition assignment operator. More... | |
bool | operator== (const String &other) const |
Compare String objects for equality. More... | |
bool | operator< (const String &other) const |
Compare if this String is lexicographically smaller than another. More... | |
bool | operator> (const String &other) const |
Compare if this String is lexicographically larger than another. More... | |
Friends | |
struct | StringHasher |
String | operator+ (String &str1, String &str2) |
Concatenate two String objects. More... | |
Detailed Description
A string implementation without C++ standard library dependencies.
Constructor & Destructor Documentation
◆ String() [1/2]
|
inline |
Copy-construct a new String object.
- Parameters
-
str a null-terminated string
◆ String() [2/2]
|
inline |
Member Function Documentation
◆ append() [1/2]
|
inline |
◆ append() [2/2]
|
inline |
◆ c_str()
|
inline |
Get the String's underlying null-terminated string.
- Returns
- the null-terminated string
◆ empty()
|
inline |
◆ len()
◆ operator+=() [1/2]
|
inline |
◆ operator+=() [2/2]
◆ operator<()
|
inline |
◆ operator=() [1/2]
|
inline |
◆ operator=() [2/2]
◆ operator==()
|
inline |
◆ operator>()
|
inline |
Friends And Related Function Documentation
◆ operator+
The documentation for this class was generated from the following file:
- common/RNBO_String.h