Class to store unicode strings. String stores 16bit unicode characters. Any characters are legal, including 0C (strings are not null-terminated). Strings are reference-counted objects. This means that as long as you copy and do not modify strings they are just referenced. The first modification breaks the link and it becomes a unique new object.
@MAXON_ANNOTATION{refclass=false}
|
MAXON_METHOD Result< Int > | GetCStringBlock (const Block< Char > &buffer, const StringEncodingRef &stringEncoding=GetUtf8DefaultEncoder()) const |
|
MAXON_METHOD Result< void > | GetCStringAppendArray (const NonConstArray< Char > &array, const StringEncodingRef &stringEncoding=GetUtf8DefaultEncoder()) const |
|
MAXON_METHOD Result< BaseArray< Char > > | GetCString (const StringEncodingRef &stringEncoding=GetUtf8DefaultEncoder()) const |
|
MAXON_METHOD Result< void > | SetCString (const Char *buffer, Int count=-1, const StringDecodingRef &stringDecoding=GetUtf8DefaultDecoder()) |
|
MAXON_FUNCTION Result< void > | SetCString (const Block< const Char > &buffer, const StringDecodingRef &stringDecoding=GetUtf8DefaultDecoder()) |
|
MAXON_METHOD Result< SysCharArray > | GetSystemEncoding () const |
|
MAXON_METHOD Result< void > | SetSystemEncoding (const SysChar *buffer, Int count=-1) |
|
MAXON_METHOD Result< void > | SetUtf32 (const Utf32Char *buffer, Int count=-1) |
|
MAXON_METHOD Result< void > | GetUtf16 (Utf16CharBuffer &stringData) const |
|
MAXON_METHOD Result< void > | SetUtf16 (const Utf16Char *buffer, Int count=-1) |
|
String | ToString (const FormatStatement *formatStatement=nullptr) const |
|
MAXON_METHOD StridedBlock< const Generic > | GetVariableInternalData () const |
|
MAXON_METHOD Int | GetCharacterWidth () const |
|
template<typename SCR = StreamConversionRef> |
MAXON_FUNCTION Result< String > | ConvertString (const SCR &converter) const |
|
MAXON_METHOD Result< String > | Prettify (Int indent=0, const String &indentStr="\t"_s, Int breakUpThreshold=100, Bool angularBrackets=false) const |
|
template<typename SCR > |
Result< String > | ConvertString (const SCR &converter) const |
|
MAXON_METHOD Int | GetLength () const |
|
MAXON_METHOD Result< void > | Init (Int count=0, Utf32Char fillChar=0) |
|
MAXON_METHOD Result< void > | Shrink () |
|
MAXON_METHOD Result< void > | Append (const StringInterface *str) |
|
MAXON_FUNCTION Result< void > | Append (const String &str) |
|
MAXON_METHOD Result< void > | Append (const Utf32Char *str, Int len) |
|
MAXON_FUNCTION Result< void > | Append (const Block< const Utf32Char > &block) |
|
MAXON_FUNCTION Result< void > | AppendChar (Utf32Char v) |
|
MAXON_METHOD Int | FindIndex (const StringInterface *str, StringPosition start=0) const |
|
MAXON_METHOD Int | FindIndex (Utf32Char ch, StringPosition start=0) const |
|
MAXON_METHOD Int | FindLastIndex (const StringInterface *str, StringPosition start=StringEnd()) const |
|
MAXON_METHOD Int | FindLastIndex (Utf32Char ch, StringPosition start=StringEnd()) const |
|
MAXON_METHOD Int | FindUpperIndex (const StringInterface *str, StringPosition start=0) const |
|
MAXON_METHOD Int | FindLastUpperIndex (const StringInterface *str, StringPosition start=StringEnd()) const |
|
MAXON_METHOD Result< void > | Erase (StringPosition position, StringCount count) |
|
MAXON_METHOD Result< void > | Insert (StringPosition position, const StringInterface *str, StringPosition strStart=0, StringCount strCount=StringEnd()) |
|
MAXON_METHOD Result< void > | Insert (StringPosition position, Utf32Char ch) |
|
MAXON_METHOD StringInterface * | GetPart (StringPosition start, StringCount count) const |
|
MAXON_METHOD StringInterface * | ToUpper () const |
|
MAXON_METHOD StringInterface * | ToLower () const |
|
MAXON_METHOD COMPARERESULT | ComparePart (const StringInterface *str, STRINGCOMPARISON mode, StringPosition position, StringCount count) const |
|
MAXON_FUNCTION COMPARERESULT | Compare (const StringInterface *str, STRINGCOMPARISON mode=STRINGCOMPARISON::UNICODE_NUMBERS) const |
|
MAXON_FUNCTION Bool | IsEqual (const StringInterface *str) const |
|
MAXON_METHOD HashInt | GetHashCode () const |
|
MAXON_METHOD UniqueHash | GetUniqueHashCode () const |
|
MAXON_METHOD void | SetChar (Int pos, Utf32Char ch) |
|
MAXON_METHOD Utf32Char | GetChar (Int pos) const |
|
MAXON_FUNCTION Result< Float64 > | ToFloat64 (STRINGCONVERSION flags=STRINGCONVERSION::NONE) const |
|
MAXON_FUNCTION Result< Float32 > | ToFloat32 (STRINGCONVERSION flags=STRINGCONVERSION::NONE) const |
|
MAXON_FUNCTION Result< Float > | ToFloat (STRINGCONVERSION flags=STRINGCONVERSION::NONE) const |
|
MAXON_FUNCTION Result< Int64 > | ToInt64 (STRINGCONVERSION flags=STRINGCONVERSION::NONE) const |
|
MAXON_FUNCTION Result< Int32 > | ToInt32 (STRINGCONVERSION flags=STRINGCONVERSION::NONE) const |
|
MAXON_FUNCTION Result< Int > | ToInt (STRINGCONVERSION flags=STRINGCONVERSION::NONE) const |
|
MAXON_FUNCTION Result< UInt64 > | ToUInt64 (STRINGCONVERSION flags=STRINGCONVERSION::NONE) const |
|
MAXON_FUNCTION Result< UInt32 > | ToUInt32 (STRINGCONVERSION flags=STRINGCONVERSION::NONE) const |
|
MAXON_FUNCTION Result< UInt > | ToUInt (STRINGCONVERSION flags=STRINGCONVERSION::NONE) const |
|
MAXON_FUNCTION StringInterface * | AppendInt (Int32 v) |
|
MAXON_FUNCTION StringInterface * | AppendInt (Int64 v) |
|
MAXON_FUNCTION StringInterface * | AppendUInt (UInt32 v) |
|
MAXON_FUNCTION StringInterface * | AppendUInt (UInt64 v) |
|
MAXON_METHOD Result< void > | GetUtf32 (Utf32CharBuffer &stringData) const |
|
MAXON_METHOD Result< void > | TrimLeft () |
|
MAXON_METHOD Result< void > | TrimRight () |
|
MAXON_METHOD Result< void > | Split (const String &splitSymbol, Bool trim, const ValueReceiver< const String & > &parts) const |
|
MAXON_METHOD Result< Int > | Replace (Utf32Char find, Utf32Char replace) |
|
MAXON_METHOD Result< Int > | Replace (const String &find, const String &replace) |
|
MAXON_METHOD Result< Int > | Replace (Utf32Char find, const String &replace) |
|
MAXON_FUNCTION Bool | Find (const String &str, Int *pos, StringPosition start=0) const |
|
MAXON_FUNCTION Bool | Find (Utf32Char ch, Int *pos, StringPosition start=0) const |
|
MAXON_FUNCTION Bool | FindLast (const String &str, Int *pos, StringPosition start=StringEnd()) const |
|
MAXON_FUNCTION Bool | FindLast (Utf32Char ch, Int *pos, StringPosition start=StringEnd()) const |
|
MAXON_FUNCTION Bool | FindUpper (const String &str, Int *pos, StringPosition start=0) const |
|
MAXON_FUNCTION Bool | FindLastUpper (const String &str, Int *pos, StringPosition start=StringEnd()) const |
|
MAXON_FUNCTION StringInterface * | GetLeftPart (StringPosition start) const |
|
MAXON_FUNCTION StringInterface * | GetRightPart (StringPosition start) const |
|
MAXON_FUNCTION Bool | StartsWith (Utf32Char ch) const |
|
MAXON_FUNCTION Bool | StartsWith (const String &str) const |
|
MAXON_FUNCTION Bool | EndsWith (Utf32Char ch) const |
|
MAXON_FUNCTION Bool | EndsWith (const String &str) const |
|
MAXON_FUNCTION Result< void > | Trim () |
|
|
static MAXON_METHOD const String & | GetAndCacheConstString (const wchar_t *chr, Int len) |
|
static MAXON_METHOD const String & | GetAndCacheConstString (const Char *chr, Int len, Int isUtf8) |
|
static MAXON_METHOD String | PrivateEnumToString (const EnumInfo &info, UInt64 value, const FormatStatement *formatStatement) |
|
static MAXON_FUNCTION String | FloatToString (Float32 value, Int charsBeforeComma=STRING_DYNAMIC_DIGITS, Int digitsAfterComma=-3, Bool exponent=false, Utf32Char fillChar=' ') |
|
static MAXON_FUNCTION String | FloatToString (Float64 value, Int charsBeforeComma=STRING_DYNAMIC_DIGITS, Int digitsAfterComma=-3, Bool exponent=false, Utf32Char fillChar=' ') |
|
static MAXON_FUNCTION String | IntToString (Int32 v) |
|
static MAXON_FUNCTION String | IntToString (Int64 v) |
|
static MAXON_FUNCTION String | UIntToString (UInt32 v) |
|
static MAXON_FUNCTION String | UIntToString (UInt64 v) |
|
static MAXON_FUNCTION String | MemorySizeToString (Int64 v, Bool mebibytes=true) |
|
static MAXON_FUNCTION String | HexToString (UInt32 v, Bool prefix0x=true) |
|
static MAXON_FUNCTION String | HexToString (UInt64 v, Bool prefix0x=true) |
|
static MAXON_FUNCTION String | PointerToString (const void *v) |
|