Requires that the string is null-terminated. Prevents const qualified memory blocks from being manipulated. This struct should be used when fennec::string would make unnecessary dynamic buffers.
|
|
constexpr | cstring () |
| | Default Constructor, initializes with nullptr.
|
| |
|
constexpr | cstring (nullptr_t) |
| | Default Constructor, initializes with nullptr.
|
| |
| constexpr | cstring (char *str, size_t n) |
| | Buffer Constructor, wraps the provided C-Style string.
|
| |
| template<size_t n> |
| constexpr | cstring (char(&str)[n]) |
| | Buffer Constructor, wraps the provided C-Style string.
|
| |
| constexpr | cstring (const char *str, size_t n) |
| | Const Buffer Constructor, wraps the provided C-Style string.
|
| |
| template<size_t n> |
| constexpr | cstring (const char(&str)[n]) |
| | Buffer Constructor, wraps the provided C-Style string.
|
| |
| constexpr | cstring (cstring &&str) noexcept |
| | Move Constructor.
|
| |
| constexpr size_t | size () const |
| |
| constexpr size_t | capacity () const |
| |
| constexpr char & | operator[] (size_t i) |
| | Array Access Operator.
|
| |
| constexpr char | operator[] (size_t i) const |
| | Const-Array Access Operator.
|
| |
| constexpr char * | data () |
| | Data Access.
|
| |
| constexpr const char * | data () const |
| | Data Access.
|
| |
|
constexpr | operator const char * () const |
| | Implicit Dereference Cast.
|
| |
| constexpr size_t | length () const |
| |
| constexpr int | compare (const cstring &str, size_t i=0, size_t n=npos) const |
| | String Comparison.
|
| |
| template<size_t n> |
| constexpr bool | operator== (const char(&str)[n]) const |
| | String Equality.
|
| |
| constexpr bool | operator== (const cstring &str) const |
| | String Equality.
|
| |
| 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 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.
|
| |