template<typename AllocT>
struct fennec::_string< AllocT >
behaviour guarantees that the underlying string is null-terminated
|
|
constexpr | _string () |
| | Default Constructor, initializes empty string.
|
| |
| constexpr | _string (size_t n, char c='\0') |
| | Sized Constructor, initializes a null-terminated string of size n with ‘'c’...`.
|
| |
| template<size_t n> |
| constexpr | _string (const char(&str)[n]) |
| | Buffer Constructor, wraps the provided C-Style string, appending a null-terminator if not present.
|
| |
| constexpr | _string (const char *buf, size_t n) |
| | Buffer Constructor, wraps the provided C-Style string, appending a null-terminator if not present.
|
| |
| constexpr | _string (const _string &str)=default |
| | String Copy Constructor.
|
| |
| constexpr | _string (_string &&str) noexcept=default |
| | String Move Constructor.
|
| |
|
constexpr | ~_string ()=default |
| | Destructor, cleans up underlying allocation.
|
| |
| constexpr size_t | size () const |
| |
| constexpr size_t | capacity () const |
| |
| constexpr char & | operator[] (size_t i) |
| | Array Access Operator.
|
| |
| constexpr const char & | operator[] (size_t i) const |
| | Const-Array Access Operator.
|
| |
| constexpr size_t | length () const |
| |
| constexpr int | compare (const cstring &str, size_t i=0, size_t n=npos) const |
| | String Comparison.
|
| |
| constexpr int | compare (const string &str, size_t i=0, size_t n=npos) const |
| | String Comparison.
|
| |
| constexpr bool | contains (char c, size_t i=0) const |
| | Check if the string contains a character.
|
| |
| constexpr size_t | find (char c, size_t i=0) const |
| | Finds the index of the first occurrence of c in the string.
|
| |
| constexpr size_t | find (const string &str, size_t i=0) const |
| | Finds the index of the first occurrence of str in the string.
|
| |
| constexpr size_t | find (const cstring &str, size_t i=0) const |
| | Finds the index of the first occurrence of str in the string.
|
| |
| constexpr size_t | rfind (char c, size_t i=npos) const |
| | Finds the index of the last occurrence of c in the string.
|
| |
| constexpr size_t | rfind (const cstring &str, size_t i=npos) const |
| | Finds the index of the last occurrence of str in the string.
|
| |
| constexpr size_t | rfind (const string &str, size_t i=npos) const |
| | Finds the index of the last occurrence of str in the string.
|
| |
| constexpr _string | substring (size_t i, size_t n=npos) const |
| | Retrieve a substring of a string.
|
| |