String with compile time configurable inline storage (small string optimization) More...
#include <String.h>
Public Member Functions | |
| SmallString (StringEncoding encoding=StringEncoding::Utf8) | |
| SmallString (const SmallString &other) | |
| SmallString (SmallString &&other) | |
| String & | operator= (const SmallString &other) |
| String & | operator= (SmallString &&other) |
| SmallString (const String &other) | |
| SmallString (String &&other) | |
| SmallString (StringSpan other) | |
| SmallString (Buffer &&otherData, StringEncoding encoding) | |
| template<size_t Q> | |
| SmallString (const char(&text)[Q]) | |
Public Member Functions inherited from SC::String | |
| String (StringEncoding encoding=StringEncoding::Utf8) | |
| Builds an empty String with a given Encoding. | |
| String (StringSpan sv) | |
| Builds String from a StringSpan. | |
| String (Buffer &&otherData, StringEncoding encoding) | |
| Builds a String from a buffer ensuring zero termination. | |
| template<size_t N> | |
| String (const char(&text)[N]) | |
| Builds String with a null terminated char string literal. | |
| bool | owns (StringSpan view) const |
| Checks if the memory pointed by the StringSpan is owned by this String. | |
| bool | assign (StringSpan sv) |
| Assigns a StringSpan to this String, replacing existing contents. | |
| StringEncoding | getEncoding () const |
| Get StringSpan encoding. | |
| size_t | sizeInBytesIncludingTerminator () const |
| Get length of the string in bytes (including null terminator bytes) | |
| const char * | bytesIncludingTerminator () const |
Access current string content as read-only null-terminated const char* | |
| bool | isEmpty () const |
| Check if String is empty. | |
| StringSpan | view () const SC_LANGUAGE_LIFETIME_BOUND |
| Obtain a null-terminated StringSpan from current String. | |
| bool | operator== (const String &other) const |
| Check if current String is same as other String. | |
| bool | operator!= (const String &other) const |
| Check if current String is different from other String. | |
| bool | operator== (const StringSpan other) const |
| Check if current String is same as other StringSpan. | |
| bool | operator!= (const StringSpan other) const |
| Check if current String is different from other StringSpan. | |
| template<size_t N> | |
| bool | operator== (const char(&other)[N]) const |
| Check if current String is equal to the ascii string literal. | |
| template<size_t N> | |
| bool | operator!= (const char(&other)[N]) const |
| Check if current String is different from the ascii string literal. | |
| bool | operator< (const StringSpan other) const |
| Check if current String is smaller to another StringView (using StringView::compare) | |
| template<size_t N> | |
| String & | operator= (const char(&text)[N]) |
| Assigns an ascii string literal to current String. | |
| String & | operator= (StringSpan view) |
| Assigns (copy) contents of given StringSpan in current String. | |
Additional Inherited Members | |
Protected Member Functions inherited from SC::String | |
| String (StringEncoding encoding, uint32_t inlineCapacity) | |
| String (Buffer &&otherData, StringEncoding encoding, uint32_t inlineCapacity) | |
Protected Attributes inherited from SC::String | |
| StringEncoding | encoding |
| Buffer | data |
String with compile time configurable inline storage (small string optimization)
| N | number of chars to reserve in inline storage |