14template<
class AllocatorType,
typename...
AllocatorArgsType>
class TUTF8StringBuilder;
32 template<
typename InitializerFunctorType>
57 return _String.
_Begin[ByteIndex];
125 Result.AllocateUninitialized(
ByteLen() * 2);
153 Result.Reallocate(Result.ByteLen() * 2 +
BytesNeeded);
180 Result.Reallocate(
DstChar - Result._String._Begin);
244 GetAllocator().Deallocate((
void*)_String.
_Begin);
247 AllocatorType& GetAllocator()
252 const AllocatorType& GetAllocator()
const
295 AllocateInitialized(StringView.
_Begin, StringView.
ByteLen());
350template<
typename InitializerFunctorType>
355 ULANG_ASSERTF(ByteLength <=
INT32_MAX,
"TUTF8String doesn't support ByteLength > INT32_MAX. (ByteLength=%zu)", ByteLength);
366 : AllocatorType(
Other.GetAllocator())
369 AllocateInitialized(
Other._String._Begin,
Other.ByteLen());
378 AllocateInitialized(
Other._String._Begin,
Other.ByteLen());
383 : AllocatorType(
Other.GetAllocator())
384 , _String(
Other._String)
392 if (_String._Begin) {
Release(); }
393 GetAllocator() =
Other.GetAllocator();
394 AllocateInitialized(
Other._String._Begin,
Other.ByteLen());
401 if (_String._Begin) {
Release(); }
402 GetAllocator() =
Other.GetAllocator();
403 _String =
Other._String;
404 Other._String.Reset();
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
T * New(FMemStackBase &Mem, int32 Count=1, int32 Align=DEFAULT_ALIGNMENT)
Definition MemStack.h:259
#define ULANG_FORCEINLINE
Definition Common.h:188
#define ULANG_ASSERTF(expr, format,...)
Definition Common.h:290
memcpy(InputBufferBase, BinkBlocksData, BinkBlocksSize)
Definition UTF8StringView.h:320
Definition UTF8StringView.h:15
void Reset()
Definition UTF8StringView.h:30
const UTF8Char * _Begin
Points to first byte.
Definition UTF8StringView.h:19
ULANG_FORCEINLINE int32_t InputByteIdxToDirectIdx(int32_t InIdx) const
Definition UTF8StringView.h:372
ULANG_FORCEINLINE bool InputByteIdxSpan(int32_t &InOutIdx, int32_t &InOutSpan) const
Definition UTF8StringView.h:392
const UTF8Char * _End
Points to the byte after the last byte.
Definition UTF8StringView.h:20
ULANG_FORCEINLINE bool IsFilled() const
Definition UTF8StringView.h:37
ULANG_FORCEINLINE UnicodeConstIterator begin() const
Definition UTF8StringView.h:362
ULANG_FORCEINLINE bool IsEmpty() const
Definition UTF8StringView.h:36
ULANG_FORCEINLINE UnicodeConstIterator end() const
Definition UTF8StringView.h:363
ULANG_FORCEINLINE int32_t ByteLen() const
Definition UTF8StringView.h:35
Definition UTF8StringBuilder.h:24
Definition UTF8String.h:21
ULANG_FORCEINLINE void Reset()
Definition UTF8String.h:40
ULANG_FORCEINLINE bool operator>=(const TUTF8String< OtherAllocatorType, OtherAllocatorArgsType... > &Other) const
Definition UTF8String.h:73
TUTF8String operator+(const CUTF8StringView &OtherStringView) const
Definition UTF8String.h:438
TUTF8String & operator+=(const CUTF8StringView &OtherStringView)
Definition UTF8String.h:409
TUTF8String(size_t ByteLength, InitializerFunctorType &&InitializerFunctor, AllocatorArgsType &&... AllocatorArgs)
ULANG_FORCEINLINE TUTF8String Replace(UTF8Char Old, UTF8Char New) const
Definition UTF8String.h:105
TUTF8String(TUTF8String &&Other)
Definition UTF8String.h:382
ULANG_FORCEINLINE bool operator!=(const TUTF8String< OtherAllocatorType, OtherAllocatorArgsType... > &Other) const
Definition UTF8String.h:65
TUTF8String operator+(const char *OtherNullTerminatedString) const
Definition UTF8String.h:452
ULANG_FORCEINLINE const char * operator*() const
Definition UTF8String.h:51
TUTF8String & operator=(TUTF8String &&Other)
Definition UTF8String.h:399
ULANG_FORCEINLINE bool InputByteIdxSpan(int32_t &InOutIdx, int32_t &InOutSpan) const
Definition UTF8String.h:189
ULANG_FORCEINLINE bool operator==(const CUTF8StringView &StringView) const
Definition UTF8String.h:74
TUTF8String & operator+=(const TUTF8String< OtherAllocatorType, OtherAllocatorArgsType... > &Other)
ULANG_FORCEINLINE UTF8Char * Resize(int32_t NewByteLen)
Definition UTF8String.h:42
TUTF8String(const TUTF8String< OtherAllocatorType, OtherAllocatorArgsType... > &Other, AllocatorArgsType &&... AllocatorArgs)
TUTF8String operator+(const TUTF8String< OtherAllocatorType, OtherAllocatorArgsType... > &Other) const
TUTF8String(AllocatorArgsType &&... AllocatorArgs, const char *NullTerminatedFormat, FormatterArgsType &&... FormatterArgs)
TUTF8String(AllocatorArgsType &&... AllocatorArgs, const char *NullTerminatedFormat, va_list FormatterArgs)
Definition UTF8String.h:322
ULANG_FORCEINLINE bool IsEmpty() const
Definition UTF8String.h:47
ULANG_FORCEINLINE const UTF8Char * AsUTF8() const
Definition UTF8String.h:49
ULANG_FORCEINLINE void Empty()
Definition UTF8String.h:41
static const TUTF8String & GetEmpty()
Definition UTF8String.h:262
ULANG_FORCEINLINE const CUTF8StringView & ToStringView() const
Definition UTF8String.h:96
TUTF8String(const char *NullTerminatedString, AllocatorArgsType &&... AllocatorArgs)
Definition UTF8String.h:283
ULANG_FORCEINLINE CUTF8StringView::UnicodeConstIterator begin() const
Definition UTF8String.h:100
ULANG_FORCEINLINE CUTF8StringView::UnicodeConstIterator end() const
Definition UTF8String.h:101
~TUTF8String()
Definition UTF8String.h:39
TUTF8String & operator=(const TUTF8String &Other)
Definition UTF8String.h:390
TUTF8String(const CUTF8StringView &StringView, AllocatorArgsType &&... AllocatorArgs)
Definition UTF8String.h:291
ULANG_FORCEINLINE bool operator<=(const TUTF8String< OtherAllocatorType, OtherAllocatorArgsType... > &Other) const
Definition UTF8String.h:69
TUTF8String & operator+=(const char *OtherNullTerminatedString)
Definition UTF8String.h:431
TUTF8String(const TUTF8String &Other)
Definition UTF8String.h:365
ULANG_FORCEINLINE bool IsFilled() const
Definition UTF8String.h:48
TUTF8String Replace(const CUTF8StringView &Old, const CUTF8StringView &New) const
Definition UTF8String.h:116
ULANG_FORCEINLINE bool operator>(const TUTF8String< OtherAllocatorType, OtherAllocatorArgsType... > &Other) const
Definition UTF8String.h:71
ULANG_FORCEINLINE int32_t InputByteIdxToDirectIdx(int32_t InIdx) const
Definition UTF8String.h:188
ULANG_FORCEINLINE bool operator==(const TUTF8String< OtherAllocatorType, OtherAllocatorArgsType... > &Other) const
Definition UTF8String.h:63
ULANG_FORCEINLINE const char * AsCString() const
Definition UTF8String.h:50
ULANG_FORCEINLINE int32_t ByteLen() const
Definition UTF8String.h:46
ULANG_FORCEINLINE const UTF8Char & operator[](int32_t ByteIndex) const
Definition UTF8String.h:54
ULANG_FORCEINLINE bool operator<(const TUTF8String< OtherAllocatorType, OtherAllocatorArgsType... > &Other) const
Definition UTF8String.h:67
TUTF8String()
Definition UTF8String.h:26
ULANG_FORCEINLINE bool operator!=(const CUTF8StringView &StringView) const
Definition UTF8String.h:75
uLang::CUTF8StringView CUTF8StringView
Definition VstNode.h:51
Definition VVMEngineEnvironment.h:23
@ DefaultInit
Definition Common.h:378
ENoInit
Enum used in constructors to indicate they should not initialize anything.
Definition Common.h:375
@ NoInit
Definition Common.h:375
uint8_t UTF8Char
UTF-8 octet.
Definition Unicode.h:20
ULANG_FORCEINLINE T && ForwardArg(typename TRemoveReference< T >::Type &Obj)
Definition References.h:115
ULANG_FORCEINLINE uint32_t GetTypeHash(const TArray< T > Array)
Definition Array.h:2132