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