Class defining a string. More...
Functions | |
String () | |
Default constructor. More... | |
~String () | |
Default destructor. More... | |
String (const String &str) | |
Copy constructor. More... | |
String (const char *data) | |
Constructor. More... | |
void | set (const char *data) |
Sets the value of the sl::String. More... | |
const char * | get () const |
Returns the value of the sl::String. More... | |
bool | empty () const |
Checks if the sl::String is empty. More... | |
String & | operator= (const String &str1) |
Copy the value of another sl::String. More... | |
String & | operator= (const char *data) |
Copy the value of a char*. More... | |
operator const char * () | |
Convert the sl::String into a char*. More... | |
const char * | c_str () const |
Returns the sl::String as a char*. More... | |
size_t | size () |
Returns the size of the sl::String. More... | |
void | clear () |
Empties the sl::String. More... | |
bool | operator== (const String &s) const |
Checks that the value of the current sl::String is equal to the value of another sl::String. More... | |
bool | operator!= (const String &s) const |
Checks that the value of the current sl::String is different to the value of another sl::String. More... | |
bool | operator< (const String &s) const |
Checks if the value of the current sl::String is lexicographically less than the value of another sl::String. More... | |
Class defining a string.
String | ( | ) |
Default constructor.
~String | ( | ) |
Default destructor.
String | ( | const char * | data | ) |
Constructor.
void set | ( | const char * | data | ) |
Sets the value of the sl::String.
const char* get | ( | ) | const |
Returns the value of the sl::String.
bool empty | ( | ) | const |
Checks if the sl::String is empty.
Copy the value of another sl::String.
String& operator= | ( | const char * | data | ) |
Copy the value of a char*.
|
inline |
Convert the sl::String into a char*.
const char* c_str | ( | ) | const |
Returns the sl::String as a char*.
Referenced by sl::operator<<().
size_t size | ( | ) |
Returns the size of the sl::String.
void clear | ( | ) |
Empties the sl::String.
bool operator== | ( | const String & | s | ) | const |
Checks that the value of the current sl::String is equal to the value of another sl::String.
bool operator!= | ( | const String & | s | ) | const |
Checks that the value of the current sl::String is different to the value of another sl::String.
bool operator< | ( | const String & | s | ) | const |
Checks if the value of the current sl::String is lexicographically less than the value of another sl::String.
other | The sl::String to compare with the current sl::String. |
true
if the current sl::String is lexicographically less than the other sl::String, otherwise false
.