|
SleakEngine 1.0.0
C++23 multi-backend game engine
|
A dynamic string class, similar to std::string but STL-agnostic. More...
#include <String.hpp>
Public Member Functions | |
| String () noexcept | |
| String (const char *str) | |
| String (const char *str, size_t len) | |
| String (const String &other) | |
| String (String &&other) noexcept | |
| ~String () | |
| Frees the backing buffer. | |
| String & | append (const char *str) |
| String & | append (const char *str, size_t len) |
| String & | append (const String &other) |
| const char * | c_str () const |
| size_t | capacity () const |
| void | clear () |
| int | compare (const String &other) const |
| bool | empty () const |
| size_t | find (const String &str, size_t pos=0) const |
| size_t | length () const |
| String & | operator+= (char ch) |
| String & | operator+= (const char *str) |
| String & | operator+= (const String &other) |
| String & | operator= (const String &other) |
| String & | operator= (String &&other) noexcept |
| char & | operator[] (size_t index) |
| const char & | operator[] (size_t index) const |
| void | reserve (size_t newCapacity) |
| void | resize (size_t newSize, char ch='\0') |
| size_t | size () const |
| String | substr (size_t pos=0, size_t len=npos) const |
Friends | |
| bool | operator!= (const String &lhs, const String &rhs) |
| String | operator+ (const char *lhs, const String &rhs) |
| String | operator+ (const String &lhs, const char *rhs) |
| String | operator+ (const String &lhs, const String &rhs) |
| bool | operator< (const String &lhs, const String &rhs) |
| std::ostream & | operator<< (std::ostream &os, const String &str) |
| bool | operator<= (const String &lhs, const String &rhs) |
| bool | operator== (const String &lhs, const String &rhs) |
| bool | operator> (const String &lhs, const String &rhs) |
| bool | operator>= (const String &lhs, const String &rhs) |
A dynamic string class, similar to std::string but STL-agnostic.
This class provides a flexible and efficient way to manage strings of characters. It is designed to be independent of the Standard Template Library (STL) and can be used in environments where STL is not available or desired.
Example Use Cases:
Implementation Details:
Definition at line 29 of file String.hpp.
|
inlinenoexcept |
Definition at line 32 of file String.hpp.
|
inline |
Definition at line 34 of file String.hpp.
|
inline |
Definition at line 36 of file String.hpp.
|
inline |
Definition at line 42 of file String.hpp.
|
inlinenoexcept |
Definition at line 47 of file String.hpp.
|
inline |
Frees the backing buffer.
Definition at line 54 of file String.hpp.
|
inline |
Definition at line 137 of file String.hpp.
|
inline |
Definition at line 141 of file String.hpp.
Definition at line 133 of file String.hpp.
|
inline |
Definition at line 152 of file String.hpp.
|
inline |
Definition at line 103 of file String.hpp.
|
inline |
Definition at line 107 of file String.hpp.
|
inline |
Definition at line 154 of file String.hpp.
|
inline |
Definition at line 104 of file String.hpp.
|
inline |
Definition at line 158 of file String.hpp.
|
inline |
Definition at line 102 of file String.hpp.
|
inline |
Definition at line 180 of file String.hpp.
|
inline |
Definition at line 176 of file String.hpp.
Definition at line 172 of file String.hpp.
Definition at line 59 of file String.hpp.
Definition at line 72 of file String.hpp.
|
inline |
Definition at line 86 of file String.hpp.
|
inline |
Definition at line 93 of file String.hpp.
|
inline |
Definition at line 123 of file String.hpp.
|
inline |
Definition at line 112 of file String.hpp.
|
inline |
Definition at line 101 of file String.hpp.
|
inline |
Definition at line 163 of file String.hpp.
Definition at line 206 of file String.hpp.
Definition at line 196 of file String.hpp.
Definition at line 190 of file String.hpp.
Definition at line 184 of file String.hpp.
Definition at line 210 of file String.hpp.
|
friend |
Definition at line 226 of file String.hpp.
Definition at line 214 of file String.hpp.
Definition at line 202 of file String.hpp.
Definition at line 218 of file String.hpp.
Definition at line 222 of file String.hpp.