UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
UE_STRING_CLASS Class Reference

Public Types

using AllocatorType = TSizedDefaultAllocator< 32 >
 
using ElementType = UE_STRING_CHARTYPE
 
using FmtCharType = UE_STRING_PRINTF_FMT_CHARTYPE
 
using IntrusiveUnsetOptionalStateType = UE_STRING_CLASS
 
typedef DataType::TIterator TIterator
 
typedef DataType::TConstIterator TConstIterator
 

Public Member Functions

 UE_STRING_CLASS ()=default
 
consteval UE_STRING_CLASS (EConstEval)
 
 UE_STRING_CLASS (UE_STRING_CLASS &&)=default
 
 UE_STRING_CLASS (const UE_STRING_CLASS &)=default
 
UE_STRING_CLASSoperator= (UE_STRING_CLASS &&)=default
 
UE_STRING_CLASSoperator= (const UE_STRING_CLASS &)=default
 
UE_FORCEINLINE_HINT UE_STRING_CLASS (const UE_STRING_CLASS &Other, int32 ExtraSlack)
 
UE_FORCEINLINE_HINT UE_STRING_CLASS (UE_STRING_CLASS &&Other, int32 ExtraSlack)
 
CORE_API UE_STRING_CLASS (const ANSICHAR *Str)
 
CORE_API UE_STRING_CLASS (const WIDECHAR *Str)
 
CORE_API UE_STRING_CLASS (const UTF8CHAR *Str)
 
CORE_API UE_STRING_CLASS (const UCS2CHAR *Str)
 
CORE_API UE_STRING_CLASS (const UTF32CHAR *Str)
 
 UE_STRING_DEPRECATED (5.4, "This constructor has been deprecated - please use " PREPROCESSOR_TO_STRING(UE_STRING_CLASS) "::ConstructFromPtrSize(Ptr, Size) instead.") CORE_API UE_STRING_CLASS(int32 Len
 
 UE_STRING_DEPRECATED (5.4, "This constructor has been deprecated - please use " PREPROCESSOR_TO_STRING(UE_STRING_CLASS) "::ConstructFromPtrSize(Ptr, Size) instead.") CORE_API UE_STRING_CLASS(int32 Len
 
 UE_STRING_DEPRECATED (5.4, "This constructor has been deprecated - please use " PREPROCESSOR_TO_STRING(UE_STRING_CLASS) "::ConstructFromPtrSize(Ptr, Size) instead.") CORE_API UE_STRING_CLASS(int32 Len
 
 UE_STRING_DEPRECATED (5.4, "This constructor has been deprecated - please use " PREPROCESSOR_TO_STRING(UE_STRING_CLASS) "::ConstructFromPtrSize(Ptr, Size) instead.") CORE_API UE_STRING_CLASS(int32 Len
 
 UE_STRING_DEPRECATED (5.4, "This constructor has been deprecated - please use " PREPROCESSOR_TO_STRING(UE_STRING_CLASS) "::ConstructWithSlack(Ptr, Size) instead.") CORE_API UE_STRING_CLASS(const ANSICHAR *Str
 
 UE_STRING_DEPRECATED (5.4, "This constructor has been deprecated - please use " PREPROCESSOR_TO_STRING(UE_STRING_CLASS) "::ConstructWithSlack(Ptr, Size) instead.") CORE_API UE_STRING_CLASS(const WIDECHAR *Str
 
 UE_STRING_DEPRECATED (5.4, "This constructor has been deprecated - please use " PREPROCESSOR_TO_STRING(UE_STRING_CLASS) "::ConstructWithSlack(Ptr, Size) instead.") CORE_API UE_STRING_CLASS(const UTF8CHAR *Str
 
 UE_STRING_DEPRECATED (5.4, "This constructor has been deprecated - please use " PREPROCESSOR_TO_STRING(UE_STRING_CLASS) "::ConstructWithSlack(Ptr, Size) instead.") CORE_API UE_STRING_CLASS(const UCS2CHAR *Str
 
template<typename CharRangeType , typename CharRangeElementType = TElementType_T<CharRangeType> UE_REQUIRES( TIsContiguousContainer<CharRangeType>::Value && !std::is_array_v<std::remove_reference_t<CharRangeType>> && TIsCharType_V<CharRangeElementType> && !std::is_base_of_v<UE_STRING_CLASS, std::decay_t<CharRangeType>> )>
UE_FORCEINLINE_HINT UE_STRING_CLASS (CharRangeType &&Str)
 
template<typename CharRangeType , typename CharRangeElementType = TElementType_T<CharRangeType> UE_REQUIRES( TIsContiguousContainer<CharRangeType>::Value && !std::is_array_v<std::remove_reference_t<CharRangeType>>&& TIsCharType_V<CharRangeElementType> && !std::is_base_of_v<UE_STRING_CLASS, std::decay_t<CharRangeType>> )>
 UE_STRING_CLASS (CharRangeType &&Str, int32 ExtraSlack)
 
 UE_STRING_CLASS (FIntrusiveUnsetOptionalState Tag)
 
bool UEOpEquals (FIntrusiveUnsetOptionalState Tag) const
 
CORE_API UE_STRING_CLASSoperator= (const ElementType *Str)
 
template<typename CharRangeType , typename CharRangeElementType = TElementType_T<CharRangeType> UE_REQUIRES( TIsContiguousContainer<CharRangeType>::Value && !std::is_array_v<std::remove_reference_t<CharRangeType>> && std::is_same_v<ElementType, CharRangeElementType> )>
UE_STRING_CLASSoperator= (CharRangeType &&Range)
 
ElementTypeoperator[] (int32 Index) UE_LIFETIMEBOUND
 
const ElementTypeoperator[] (int32 Index) const UE_LIFETIMEBOUND
 
UE_FORCEINLINE_HINT TIterator CreateIterator ()
 
UE_FORCEINLINE_HINT TConstIterator CreateConstIterator () const
 
UE_FORCEINLINE_HINT DataType::RangedForIteratorType begin ()
 
UE_FORCEINLINE_HINT DataType::RangedForConstIteratorType begin () const
 
UE_FORCEINLINE_HINT DataType::RangedForIteratorType end ()
 
UE_FORCEINLINE_HINT DataType::RangedForConstIteratorType end () const
 
UE_FORCEINLINE_HINT DataType::RangedForReverseIteratorType rbegin ()
 
UE_FORCEINLINE_HINT DataType::RangedForConstReverseIteratorType rbegin () const
 
UE_FORCEINLINE_HINT DataType::RangedForReverseIteratorType rend ()
 
UE_FORCEINLINE_HINT DataType::RangedForConstReverseIteratorType rend () const
 
UE_FORCEINLINE_HINT SIZE_T GetAllocatedSize () const
 
void CheckInvariants () const
 
CORE_API void Empty ()
 
CORE_API void Empty (int32 Slack)
 
UE_FORCEINLINE_HINT bool IsEmpty () const
 
CORE_API void Reset (int32 NewReservedSize=0)
 
CORE_API void Shrink ()
 
UE_FORCEINLINE_HINT bool IsValidIndex (int32 Index) const
 
UE_FORCEINLINE_HINT const ElementTypeoperator* () const UE_LIFETIMEBOUND
 
UE_FORCEINLINE_HINT DataTypeGetCharArray () UE_LIFETIMEBOUND
 
UE_FORCEINLINE_HINT const DataTypeGetCharArray () const UE_LIFETIMEBOUND
 
CORE_API void AppendChars (const ANSICHAR *Str, int32 Count)
 
CORE_API void AppendChars (const WIDECHAR *Str, int32 Count)
 
CORE_API void AppendChars (const UCS2CHAR *Str, int32 Count)
 
CORE_API void AppendChars (const UTF8CHAR *Str, int32 Count)
 
CORE_API void AppendChars (const UTF32CHAR *Str, int32 Count)
 
template<class CharType >
UE_STRING_CLASSAppend (const CharType *Str, int32 Count)
 
template<class CharType >
UE_STRING_CLASSAppend (CharType *Str)
 
template<typename CharRangeType , typename CharRangeElementType = TElementType_T<CharRangeType>>
UE_STRING_CLASSAppend (CharRangeType &&Str)
 
CORE_API UE_STRING_CLASSAppendChar (ElementType InChar)
 
template<typename StrType >
UE_FORCEINLINE_HINT auto operator+= (StrType &&Str) -> decltype(Append(Forward< StrType >(Str)))
 
template<typename AppendedCharType >
UE_STRING_CLASSoperator+= (AppendedCharType Char)
 
CORE_API void InsertAt (int32 Index, ElementType Character)
 
CORE_API void InsertAt (int32 Index, const UE_STRING_CLASS &Characters)
 
CORE_API void RemoveAt (int32 Index, EAllowShrinking AllowShrinking=EAllowShrinking::Default)
 
CORE_API void RemoveAt (int32 Index, int32 Count, EAllowShrinking AllowShrinking=EAllowShrinking::Default)
 
UE_FORCEINLINE_HINT void RemoveAt (int32 Index, int32 Count, bool bAllowShrinking)
 
template<typename CharRangeType , typename CharRangeElementType = TElementType_T<CharRangeType> UE_REQUIRES( TIsContiguousContainer<CharRangeType>::Value && !std::is_array_v<std::remove_reference_t<CharRangeType>>&& TIsCharType_V<CharRangeElementType> && !std::is_base_of_v<UE_STRING_CLASS, std::decay_t<CharRangeType>> )>
bool RemoveFromStart (CharRangeType &&InPrefix, ESearchCase::Type SearchCase=ESearchCase::IgnoreCase)
 
bool RemoveFromStart (const ElementType *InPrefix, ESearchCase::Type SearchCase=ESearchCase::IgnoreCase)
 
bool RemoveFromStart (const UE_STRING_CLASS &InPrefix, ESearchCase::Type SearchCase=ESearchCase::IgnoreCase)
 
CORE_API bool RemoveFromStart (const ElementType *InPrefix, int32 InPrefixLen, ESearchCase::Type SearchCase=ESearchCase::IgnoreCase)
 
template<typename CharRangeType , typename CharRangeElementType = TElementType_T<CharRangeType> UE_REQUIRES( TIsContiguousContainer<CharRangeType>::Value && !std::is_array_v<std::remove_reference_t<CharRangeType>>&& TIsCharType_V<CharRangeElementType> && !std::is_base_of_v<UE_STRING_CLASS, std::decay_t<CharRangeType>> )>
bool RemoveFromEnd (CharRangeType &&InSuffix, ESearchCase::Type SearchCase=ESearchCase::IgnoreCase)
 
bool RemoveFromEnd (const ElementType *InSuffix, ESearchCase::Type SearchCase=ESearchCase::IgnoreCase)
 
bool RemoveFromEnd (const UE_STRING_CLASS &InSuffix, ESearchCase::Type SearchCase=ESearchCase::IgnoreCase)
 
CORE_API bool RemoveFromEnd (const ElementType *InSuffix, int32 InSuffixLen, ESearchCase::Type SearchCase=ESearchCase::IgnoreCase)
 
CORE_API void PathAppend (const ElementType *Str, int32 StrLength)
 
UE_STRING_CLASSoperator/= (const ElementType *Str)
 
template<typename CharRangeType , typename CharRangeElementType = TElementType_T<CharRangeType> UE_REQUIRES( TIsContiguousContainer<CharRangeType>::Value && !std::is_array_v<std::remove_reference_t<CharRangeType>>&& std::is_same_v<ElementType, CharRangeElementType> )>
UE_STRING_CLASSoperator/= (CharRangeType &&Str)
 
template<typename CharType >
UE_STRING_CLASSoperator/= (const CharType *Str)
 
UE_FORCEINLINE_HINT bool UEOpLessThan (const UE_STRING_CLASS &Rhs) const
 
template<typename CharType >
UE_FORCEINLINE_HINT bool UEOpLessThan (const CharType *Rhs) const
 
template<typename CharType >
UE_FORCEINLINE_HINT bool UEOpGreaterThan (const CharType *Rhs) const
 
UE_FORCEINLINE_HINT bool UEOpEquals (const UE_STRING_CLASS &Rhs) const
 
template<typename CharType >
UE_FORCEINLINE_HINT bool UEOpEquals (const CharType *Rhs) const
 
UE_FORCEINLINE_HINT int32 Len () const
 
UE_FORCEINLINE_HINT SIZE_T NumBytesWithoutNull () const
 
UE_FORCEINLINE_HINT SIZE_T NumBytesWithNull () const
 
UE_FORCEINLINE_HINT UE_STRING_CLASS Left (int32 Count) const &
 
UE_STRING_CLASS Left (int32 Count) &&
 
void LeftInline (int32 Count, EAllowShrinking AllowShrinking=EAllowShrinking::Default)
 
UE_FORCEINLINE_HINT void LeftInline (int32 Count, bool bAllowShrinking)
 
UE_STRING_CLASS LeftChop (int32 Count) const &
 
UE_STRING_CLASS LeftChop (int32 Count) &&
 
void LeftChopInline (int32 Count, EAllowShrinking AllowShrinking=EAllowShrinking::Default)
 
UE_FORCEINLINE_HINT void LeftChopInline (int32 Count, bool bAllowShrinking)
 
UE_STRING_CLASS Right (int32 Count) const &
 
UE_STRING_CLASS Right (int32 Count) &&
 
void RightInline (int32 Count, EAllowShrinking AllowShrinking=EAllowShrinking::Default)
 
UE_FORCEINLINE_HINT void RightInline (int32 Count, bool bAllowShrinking)
 
CORE_API UE_STRING_CLASS RightChop (int32 Count) const &
 
UE_STRING_CLASS RightChop (int32 Count) &&
 
UE_FORCEINLINE_HINT void RightChopInline (int32 Count, EAllowShrinking AllowShrinking=EAllowShrinking::Default)
 
UE_FORCEINLINE_HINT void RightChopInline (int32 Count, bool bAllowShrinking)
 
CORE_API UE_STRING_CLASS Mid (int32 Start, int32 Count) const &
 
CORE_API UE_STRING_CLASS Mid (int32 Start, int32 Count) &&
 
UE_FORCEINLINE_HINT UE_STRING_CLASS Mid (int32 Start) const &
 
UE_FORCEINLINE_HINT UE_STRING_CLASS Mid (int32 Start) &&
 
void MidInline (int32 Start, int32 Count=MAX_int32, EAllowShrinking AllowShrinking=EAllowShrinking::Default)
 
UE_FORCEINLINE_HINT void MidInline (int32 Start, int32 Count, bool bAllowShrinking)
 
template<typename CharRangeType , typename CharRangeElementType = TElementType_T<CharRangeType> UE_REQUIRES( TIsContiguousContainer<CharRangeType>::Value && !std::is_array_v<std::remove_reference_t<CharRangeType>>&& TIsCharType_V<CharRangeElementType> && !std::is_base_of_v<UE_STRING_CLASS, std::decay_t<CharRangeType>> )>
int32 Find (CharRangeType &&SubStr, ESearchCase::Type SearchCase=ESearchCase::IgnoreCase, ESearchDir::Type SearchDir=ESearchDir::FromStart, int32 StartPosition=INDEX_NONE) const
 
int32 Find (const ElementType *SubStr, ESearchCase::Type SearchCase=ESearchCase::IgnoreCase, ESearchDir::Type SearchDir=ESearchDir::FromStart, int32 StartPosition=INDEX_NONE) const
 
int32 Find (const UE_STRING_CLASS &SubStr, ESearchCase::Type SearchCase=ESearchCase::IgnoreCase, ESearchDir::Type SearchDir=ESearchDir::FromStart, int32 StartPosition=INDEX_NONE) const
 
CORE_API int32 Find (const ElementType *SubStr, int32 InSubStrLen, ESearchCase::Type SearchCase=ESearchCase::IgnoreCase, ESearchDir::Type SearchDir=ESearchDir::FromStart, int32 StartPosition=INDEX_NONE) const
 
template<typename CharRangeType , typename CharRangeElementType = TElementType_T<CharRangeType> UE_REQUIRES( TIsContiguousContainer<CharRangeType>::Value && !std::is_array_v<std::remove_reference_t<CharRangeType>>&& TIsCharType_V<CharRangeElementType> && !std::is_base_of_v<UE_STRING_CLASS, std::decay_t<CharRangeType>> )>
bool Contains (CharRangeType &&SubStr, ESearchCase::Type SearchCase=ESearchCase::IgnoreCase, ESearchDir::Type SearchDir=ESearchDir::FromStart) const
 
UE_FORCEINLINE_HINT bool Contains (const ElementType *SubStr, ESearchCase::Type SearchCase=ESearchCase::IgnoreCase, ESearchDir::Type SearchDir=ESearchDir::FromStart) const
 
UE_FORCEINLINE_HINT bool Contains (const UE_STRING_CLASS &SubStr, ESearchCase::Type SearchCase=ESearchCase::IgnoreCase, ESearchDir::Type SearchDir=ESearchDir::FromStart) const
 
UE_FORCEINLINE_HINT bool Contains (const ElementType *SubStr, int32 SubStrLen, ESearchCase::Type SearchCase=ESearchCase::IgnoreCase, ESearchDir::Type SearchDir=ESearchDir::FromStart) const
 
UE_FORCEINLINE_HINT bool FindChar (ElementType InChar, int32 &OutIndex) const
 
UE_FORCEINLINE_HINT bool FindLastChar (ElementType InChar, int32 &OutIndex) const
 
template<typename Predicate >
int32 FindLastCharByPredicate (Predicate Pred, int32 Count) const
 
template<typename Predicate >
UE_FORCEINLINE_HINT int32 FindLastCharByPredicate (Predicate Pred) const
 
bool Equals (const UE_STRING_CLASS &Other, ESearchCase::Type SearchCase=ESearchCase::CaseSensitive) const
 
int32 Compare (const UE_STRING_CLASS &Other, ESearchCase::Type SearchCase=ESearchCase::CaseSensitive) const
 
CORE_API bool Split (const UE_STRING_CLASS &InStr, UE_STRING_CLASS *LeftS, UE_STRING_CLASS *RightS, ESearchCase::Type SearchCase, ESearchDir::Type SearchDir=ESearchDir::FromStart) const
 
CORE_API bool Split (const UE_STRING_CLASS &InStr, UE_STRING_CLASS *LeftS, UE_STRING_CLASS *RightS) const
 
CORE_API UE_STRING_CLASS ToUpper () const &
 
CORE_API UE_STRING_CLASS ToUpper () &&
 
CORE_API void ToUpperInline ()
 
CORE_API UE_STRING_CLASS ToLower () const &
 
CORE_API UE_STRING_CLASS ToLower () &&
 
CORE_API void ToLowerInline ()
 
CORE_API UE_STRING_CLASS LeftPad (int32 ChCount) const
 
CORE_API UE_STRING_CLASS RightPad (int32 ChCount) const
 
CORE_API bool IsNumeric () const
 
CORE_API void RemoveSpacesInline ()
 
template<typename... Types>
UE_STRING_CLASSAppendf (UE::Core::TCheckedFormatString< FmtCharType, Types... > Fmt, Types... Args)
 
template<typename CharRangeType , typename CharRangeElementType = TElementType_T<CharRangeType> UE_REQUIRES( TIsContiguousContainer<CharRangeType>::Value && !std::is_array_v<std::remove_reference_t<CharRangeType>>&& TIsCharType_V<CharRangeElementType> && !std::is_base_of_v<UE_STRING_CLASS, std::decay_t<CharRangeType>> )>
bool StartsWith (CharRangeType &&InPrefix, ESearchCase::Type SearchCase=ESearchCase::IgnoreCase) const
 
bool StartsWith (const ElementType *InPrefix, ESearchCase::Type SearchCase=ESearchCase::IgnoreCase) const
 
bool StartsWith (const UE_STRING_CLASS &InPrefix, ESearchCase::Type SearchCase=ESearchCase::IgnoreCase) const
 
CORE_API bool StartsWith (const ElementType *InPrefix, int32 InPrefixLen, ESearchCase::Type SearchCase=ESearchCase::IgnoreCase) const
 
template<typename CharRangeType , typename CharRangeElementType = TElementType_T<CharRangeType> UE_REQUIRES( TIsContiguousContainer<CharRangeType>::Value && !std::is_array_v<std::remove_reference_t<CharRangeType>>&& TIsCharType_V<CharRangeElementType> && !std::is_base_of_v<UE_STRING_CLASS, std::decay_t<CharRangeType>> )>
bool EndsWith (CharRangeType &&InSuffix, ESearchCase::Type SearchCase=ESearchCase::IgnoreCase) const
 
bool EndsWith (const ElementType *InSuffix, ESearchCase::Type SearchCase=ESearchCase::IgnoreCase) const
 
bool EndsWith (const UE_STRING_CLASS &InSuffix, ESearchCase::Type SearchCase=ESearchCase::IgnoreCase) const
 
CORE_API bool EndsWith (const ElementType *InSuffix, int32 InSuffixLen, ESearchCase::Type SearchCase=ESearchCase::IgnoreCase) const
 
template<typename CharRangeType , typename CharRangeElementType = TElementType_T<CharRangeType> UE_REQUIRES( TIsContiguousContainer<CharRangeType>::Value && !std::is_array_v<std::remove_reference_t<CharRangeType>>&& TIsCharType_V<CharRangeElementType> && !std::is_base_of_v<UE_STRING_CLASS, std::decay_t<CharRangeType>> )>
bool MatchesWildcard (CharRangeType &&Wildcard, ESearchCase::Type SearchCase=ESearchCase::IgnoreCase) const
 
bool MatchesWildcard (const ElementType *Wildcard, ESearchCase::Type SearchCase=ESearchCase::IgnoreCase) const
 
bool MatchesWildcard (const UE_STRING_CLASS &Wildcard, ESearchCase::Type SearchCase=ESearchCase::IgnoreCase) const
 
CORE_API bool MatchesWildcard (const ElementType *Wildcard, int32 WildcardLen, ESearchCase::Type SearchCase=ESearchCase::IgnoreCase) const
 
CORE_API void TrimStartAndEndInline ()
 
CORE_API UE_STRING_CLASS TrimStartAndEnd () const &
 
CORE_API UE_STRING_CLASS TrimStartAndEnd () &&
 
CORE_API void TrimStartInline ()
 
CORE_API UE_STRING_CLASS TrimStart () const &
 
CORE_API UE_STRING_CLASS TrimStart () &&
 
CORE_API void TrimEndInline ()
 
CORE_API UE_STRING_CLASS TrimEnd () const &
 
CORE_API UE_STRING_CLASS TrimEnd () &&
 
CORE_API void TrimToNullTerminator ()
 
CORE_API void TrimQuotesInline (bool *bQuotesRemoved=nullptr)
 
CORE_API void TrimCharInline (ElementType CharacterToTrim, bool *bCharRemoved)
 
CORE_API UE_STRING_CLASS TrimQuotes (bool *bQuotesRemoved=nullptr) const &
 
CORE_API UE_STRING_CLASS TrimQuotes (bool *bQuotesRemoved=nullptr) &&
 
CORE_API UE_STRING_CLASS TrimChar (ElementType CharacterToTrim, bool *bCharRemoved=nullptr) const &
 
CORE_API UE_STRING_CLASS TrimChar (ElementType CharacterToTrim, bool *bCharRemoved=nullptr) &&
 
CORE_API int32 ParseIntoArray (TArray< UE_STRING_CLASS > &OutArray, const ElementType *pchDelim, bool bInCullEmpty=true) const
 
CORE_API int32 ParseIntoArrayWS (TArray< UE_STRING_CLASS > &OutArray, const ElementType *pchExtraDelim=nullptr, bool bInCullEmpty=true) const
 
CORE_API int32 ParseIntoArrayLines (TArray< UE_STRING_CLASS > &OutArray, bool bInCullEmpty=true) const
 
CORE_API int32 ParseIntoArray (TArray< UE_STRING_CLASS > &OutArray, const ElementType *const *DelimArray, int32 NumDelims, bool bInCullEmpty=true) const
 
CORE_API UE_STRING_CLASS Reverse () const &
 
CORE_API UE_STRING_CLASS Reverse () &&
 
CORE_API void ReverseString ()
 
CORE_API UE_STRING_CLASS Replace (const ElementType *From, const ElementType *To, ESearchCase::Type SearchCase=ESearchCase::IgnoreCase) const &
 
CORE_API UE_STRING_CLASS Replace (const ElementType *From, const ElementType *To, ESearchCase::Type SearchCase=ESearchCase::IgnoreCase) &&
 
CORE_API int32 ReplaceInline (const ElementType *SearchText, const ElementType *ReplacementText, ESearchCase::Type SearchCase=ESearchCase::IgnoreCase)
 
void ReplaceCharInline (ElementType From, ElementType To, ESearchCase::Type SearchCase=ESearchCase::IgnoreCase)
 
UE_STRING_CLASS ReplaceQuotesWithEscapedQuotes () const &
 
CORE_API UE_STRING_CLASS ReplaceQuotesWithEscapedQuotes () &&
 
CORE_API void ReplaceCharWithEscapedCharInline (const TArray< ElementType > *Chars=nullptr)
 
UE_STRING_CLASS ReplaceCharWithEscapedChar (const TArray< ElementType > *Chars=nullptr) const &
 
UE_STRING_CLASS ReplaceCharWithEscapedChar (const TArray< ElementType > *Chars=nullptr) &&
 
CORE_API void ReplaceEscapedCharWithCharInline (const TArray< ElementType > *Chars=nullptr)
 
UE_STRING_CLASS ReplaceEscapedCharWithChar (const TArray< ElementType > *Chars=nullptr) const &
 
UE_STRING_CLASS ReplaceEscapedCharWithChar (const TArray< ElementType > *Chars=nullptr) &&
 
CORE_API void ConvertTabsToSpacesInline (const int32 InSpacesPerTab)
 
UE_STRING_CLASS ConvertTabsToSpaces (const int32 InSpacesPerTab) const &
 
UE_STRING_CLASS ConvertTabsToSpaces (const int32 InSpacesPerTab) &&
 
CORE_API void Reserve (int32 CharacterCount)
 
CORE_API void SerializeAsANSICharArray (FArchive &Ar, int32 MinCharacters=0) const
 
CORE_API void AppendInt (int32 InNum)
 
CORE_API bool ToBool () const
 
UE_FORCEINLINE_HINT void CountBytes (FArchive &Ar) const
 

Static Public Member Functions

static CORE_API UE_STRING_CLASS ConstructWithSlack (const ANSICHAR *Str, int32 ExtraSlack)
 
static CORE_API UE_STRING_CLASS ConstructWithSlack (const WIDECHAR *Str, int32 ExtraSlack)
 
static CORE_API UE_STRING_CLASS ConstructWithSlack (const UTF8CHAR *Str, int32 ExtraSlack)
 
static CORE_API UE_STRING_CLASS ConstructWithSlack (const UCS2CHAR *Str, int32 ExtraSlack)
 
static CORE_API UE_STRING_CLASS ConstructWithSlack (const UTF32CHAR *Str, int32 ExtraSlack)
 
static CORE_API UE_STRING_CLASS ConstructFromPtrSize (const ANSICHAR *Str, int32 Size)
 
static CORE_API UE_STRING_CLASS ConstructFromPtrSize (const WIDECHAR *Str, int32 Size)
 
static CORE_API UE_STRING_CLASS ConstructFromPtrSize (const UTF8CHAR *Str, int32 Size)
 
static CORE_API UE_STRING_CLASS ConstructFromPtrSize (const UCS2CHAR *Str, int32 Size)
 
static CORE_API UE_STRING_CLASS ConstructFromPtrSize (const UTF32CHAR *Str, int32 Size)
 
static CORE_API UE_STRING_CLASS ConstructFromPtrSizeWithSlack (const ANSICHAR *Str, int32 Size, int32 ExtraSlack)
 
static CORE_API UE_STRING_CLASS ConstructFromPtrSizeWithSlack (const WIDECHAR *Str, int32 Size, int32 ExtraSlack)
 
static CORE_API UE_STRING_CLASS ConstructFromPtrSizeWithSlack (const UTF8CHAR *Str, int32 Size, int32 ExtraSlack)
 
static CORE_API UE_STRING_CLASS ConstructFromPtrSizeWithSlack (const UCS2CHAR *Str, int32 Size, int32 ExtraSlack)
 
static CORE_API UE_STRING_CLASS ConstructFromPtrSizeWithSlack (const UTF32CHAR *Str, int32 Size, int32 ExtraSlack)
 
template<typename... Types>
static UE_STRING_CLASS Printf (UE::Core::TCheckedFormatString< FmtCharType, Types... > Fmt, Types... Args)
 
static UE_STRING_CLASS Format (const FmtCharType *InFormatString, const PREPROCESSOR_JOIN(UE_STRING_CLASS, FormatNamedArguments)&InNamedArguments)
 
static UE_STRING_CLASS Format (const FmtCharType *InFormatString, const FStringFormatOrderedArguments &InOrderedArguments)
 
static CORE_API UE_STRING_CLASS Chr (ElementType Ch)
 
static CORE_API UE_STRING_CLASS ChrN (int32 NumCharacters, ElementType Char)
 
static CORE_API int32 CullArray (TArray< UE_STRING_CLASS > *InOutArray)
 
static CORE_API UE_STRING_CLASS FormatAsNumber (int32 InNumber)
 
static UE_STRING_CLASS FromInt (int32 Num)
 
static CORE_API UE_STRING_CLASS FromBlob (const uint8 *SrcBuffer, const uint32 SrcSize)
 
static CORE_API bool ToBlob (const UE_STRING_CLASS &Source, uint8 *DestBuffer, const uint32 DestSize)
 
static CORE_API UE_STRING_CLASS FromHexBlob (const uint8 *SrcBuffer, const uint32 SrcSize)
 
static CORE_API bool ToHexBlob (const UE_STRING_CLASS &Source, uint8 *DestBuffer, const uint32 DestSize)
 
static CORE_API UE_STRING_CLASS SanitizeFloat (double InFloat, const int32 InMinFractionalDigits=1)
 
template<typename RangeType >
static UE_STRING_CLASS Join (const RangeType &Range, const ElementType *Separator)
 
template<typename RangeType , typename ProjectionType >
static UE_STRING_CLASS JoinBy (const RangeType &Range, const ElementType *Separator, ProjectionType Proj)
 
static void AutoRTFMAssignFromOpenToClosed (UE_STRING_CLASS &Closed, const UE_STRING_CLASS &Open)
 

Public Attributes

const ANSICHARStr
 
const WIDECHARStr
 
const UTF8CHARStr
 
const UCS2CHARStr
 
int32 ExtraSlack
 

Static Public Attributes

static constexpr bool bHasIntrusiveUnsetOptionalState = true
 

Friends

template<typename CharType >
UE_STRING_CLASS operator+ (const UE_STRING_CLASS &Lhs, CharType Rhs)
 
template<typename CharType >
UE_STRING_CLASS operator+ (UE_STRING_CLASS &&Lhs, CharType Rhs)
 
UE_FORCEINLINE_HINT friend UE_STRING_CLASS operator+ (const UE_STRING_CLASS &Lhs, const UE_STRING_CLASS &Rhs)
 
UE_FORCEINLINE_HINT friend UE_STRING_CLASS operator+ (UE_STRING_CLASS &&Lhs, const UE_STRING_CLASS &Rhs)
 
UE_FORCEINLINE_HINT friend UE_STRING_CLASS operator+ (const UE_STRING_CLASS &Lhs, UE_STRING_CLASS &&Rhs)
 
UE_FORCEINLINE_HINT friend UE_STRING_CLASS operator+ (UE_STRING_CLASS &&Lhs, UE_STRING_CLASS &&Rhs)
 
UE_FORCEINLINE_HINT friend UE_STRING_CLASS operator+ (const ElementType *Lhs, const UE_STRING_CLASS &Rhs)
 
UE_FORCEINLINE_HINT friend UE_STRING_CLASS operator+ (const ElementType *Lhs, UE_STRING_CLASS &&Rhs)
 
UE_FORCEINLINE_HINT friend UE_STRING_CLASS operator+ (const UE_STRING_CLASS &Lhs, const ElementType *Rhs)
 
UE_FORCEINLINE_HINT friend UE_STRING_CLASS operator+ (UE_STRING_CLASS &&Lhs, const ElementType *Rhs)
 
template<typename CharRangeType , typename CharRangeElementType = TElementType_T<CharRangeType> UE_REQUIRES( TIsContiguousContainer<CharRangeType>::Value && !std::is_array_v<std::remove_reference_t<CharRangeType>> && std::is_same_v<ElementType, CharRangeElementType> && !std::is_base_of_v<UE_STRING_CLASS, std::decay_t<CharRangeType>> )>
UE_FORCEINLINE_HINT friend UE_STRING_CLASS operator+ (CharRangeType &&Lhs, const UE_STRING_CLASS &Rhs)
 
template<typename CharRangeType , typename CharRangeElementType = TElementType_T<CharRangeType> UE_REQUIRES( TIsContiguousContainer<CharRangeType>::Value && !std::is_array_v<std::remove_reference_t<CharRangeType>>&& std::is_same_v<ElementType, CharRangeElementType> && !std::is_base_of_v<UE_STRING_CLASS, std::decay_t<CharRangeType>> )>
UE_FORCEINLINE_HINT friend UE_STRING_CLASS operator+ (CharRangeType &&Lhs, UE_STRING_CLASS &&Rhs)
 
template<typename CharRangeType , typename CharRangeElementType = TElementType_T<CharRangeType> UE_REQUIRES( TIsContiguousContainer<CharRangeType>::Value && !std::is_array_v<std::remove_reference_t<CharRangeType>>&& std::is_same_v<ElementType, CharRangeElementType> && !std::is_base_of_v<UE_STRING_CLASS, std::decay_t<CharRangeType>> )>
UE_FORCEINLINE_HINT friend UE_STRING_CLASS operator+ (const UE_STRING_CLASS &Lhs, CharRangeType &&Rhs)
 
template<typename CharRangeType , typename CharRangeElementType = TElementType_T<CharRangeType> UE_REQUIRES( TIsContiguousContainer<CharRangeType>::Value && !std::is_array_v<std::remove_reference_t<CharRangeType>>&& std::is_same_v<ElementType, CharRangeElementType> && !std::is_base_of_v<UE_STRING_CLASS, std::decay_t<CharRangeType>> )>
UE_FORCEINLINE_HINT friend UE_STRING_CLASS operator+ (UE_STRING_CLASS &&Lhs, CharRangeType &&Rhs)
 
UE_STRING_CLASS operator/ (const UE_STRING_CLASS &Lhs, const ElementType *Rhs)
 
UE_STRING_CLASS operator/ (UE_STRING_CLASS &&Lhs, const ElementType *Rhs)
 
UE_STRING_CLASS operator/ (const UE_STRING_CLASS &Lhs, const UE_STRING_CLASS &Rhs)
 
UE_STRING_CLASS operator/ (UE_STRING_CLASS &&Lhs, const UE_STRING_CLASS &Rhs)
 
UE_STRING_CLASS operator/ (const ElementType *Lhs, const UE_STRING_CLASS &Rhs)
 
CORE_API FArchiveoperator<< (FArchive &Ar, UE_STRING_CLASS &Str)
 
UE_FORCEINLINE_HINT uint32 GetTypeHash (const UE_STRING_CLASS &S)
 

Detailed Description

A dynamically sizeable string.

See also
https://docs.unrealengine.com/latest/INT/Programming/UnrealArchitecture/StringHandling/FString/

When dealing with UTF-8 literals, the following advice is recommended:

  • Do not use the u8"..." prefix (gives the wrong array type until C++20).
  • Use UTF8TEXT("...") for array literals (type is const UTF8CHAR[n]).
  • Use UTF8TEXTVIEW("...") for string view literals (type is FUtf8StringView).
  • Use \uxxxx or \Uxxxxxxxx escape sequences rather than \x to specify Unicode code points.

Member Typedef Documentation

◆ AllocatorType

using UE_STRING_CLASS::AllocatorType = TSizedDefaultAllocator<32>

◆ ElementType

using UE_STRING_CLASS::ElementType = UE_STRING_CHARTYPE

◆ FmtCharType

using UE_STRING_CLASS::FmtCharType = UE_STRING_PRINTF_FMT_CHARTYPE

◆ IntrusiveUnsetOptionalStateType

using UE_STRING_CLASS::IntrusiveUnsetOptionalStateType = UE_STRING_CLASS

◆ TConstIterator

typedef DataType::TConstIterator UE_STRING_CLASS::TConstIterator

◆ TIterator

typedef DataType::TIterator UE_STRING_CLASS::TIterator

Iterator typedefs

Constructor & Destructor Documentation

◆ UE_STRING_CLASS() [1/14]

UE_STRING_CLASS::UE_STRING_CLASS ( )
default

◆ UE_STRING_CLASS() [2/14]

consteval UE_STRING_CLASS::UE_STRING_CLASS ( EConstEval  )
inlineexplicit

◆ UE_STRING_CLASS() [3/14]

UE_STRING_CLASS::UE_STRING_CLASS ( UE_STRING_CLASS &&  )
default

◆ UE_STRING_CLASS() [4/14]

UE_STRING_CLASS::UE_STRING_CLASS ( const UE_STRING_CLASS )
default

◆ UE_STRING_CLASS() [5/14]

UE_FORCEINLINE_HINT UE_STRING_CLASS::UE_STRING_CLASS ( const UE_STRING_CLASS Other,
int32  ExtraSlack 
)
inline

Create a copy of the Other string with extra space for characters at the end of the string

Parameters
Otherthe other string to create a new copy from
ExtraSlacknumber of extra characters to add to the end of the other string in this string

◆ UE_STRING_CLASS() [6/14]

UE_FORCEINLINE_HINT UE_STRING_CLASS::UE_STRING_CLASS ( UE_STRING_CLASS &&  Other,
int32  ExtraSlack 
)
inline

Create a copy of the Other string with extra space for characters at the end of the string

Parameters
Otherthe other string to create a new copy from
ExtraSlacknumber of extra characters to add to the end of the other string in this string

◆ UE_STRING_CLASS() [7/14]

UE_STRING_CLASS::UE_STRING_CLASS ( const ANSICHAR Str)

Construct from null-terminated C string or nullptr

◆ UE_STRING_CLASS() [8/14]

UE_STRING_CLASS::UE_STRING_CLASS ( const WIDECHAR Str)

◆ UE_STRING_CLASS() [9/14]

UE_STRING_CLASS::UE_STRING_CLASS ( const UTF8CHAR Str)

◆ UE_STRING_CLASS() [10/14]

UE_STRING_CLASS::UE_STRING_CLASS ( const UCS2CHAR Str)

◆ UE_STRING_CLASS() [11/14]

UE_STRING_CLASS::UE_STRING_CLASS ( const UTF32CHAR Str)

◆ UE_STRING_CLASS() [12/14]

template<typename CharRangeType , typename CharRangeElementType = TElementType_T<CharRangeType> UE_REQUIRES( TIsContiguousContainer<CharRangeType>::Value && !std::is_array_v<std::remove_reference_t<CharRangeType>> && TIsCharType_V<CharRangeElementType> && !std::is_base_of_v<UE_STRING_CLASS, std::decay_t<CharRangeType>> )>
UE_FORCEINLINE_HINT UE_STRING_CLASS::UE_STRING_CLASS ( CharRangeType &&  Str)
inlineexplicit

Construct from contiguous range of characters such as a string view or string builder

◆ UE_STRING_CLASS() [13/14]

template<typename CharRangeType , typename CharRangeElementType = TElementType_T<CharRangeType> UE_REQUIRES( TIsContiguousContainer<CharRangeType>::Value && !std::is_array_v<std::remove_reference_t<CharRangeType>>&& TIsCharType_V<CharRangeElementType> && !std::is_base_of_v<UE_STRING_CLASS, std::decay_t<CharRangeType>> )>
UE_STRING_CLASS::UE_STRING_CLASS ( CharRangeType &&  Str,
int32  ExtraSlack 
)
inlineexplicit

Construct from contiguous range of characters with extra slack on top of original string length

◆ UE_STRING_CLASS() [14/14]

UE_STRING_CLASS::UE_STRING_CLASS ( FIntrusiveUnsetOptionalState  Tag)
inlineexplicit

Member Function Documentation

◆ Append() [1/3]

template<typename CharRangeType , typename CharRangeElementType = TElementType_T<CharRangeType>>
UE_STRING_CLASS & UE_STRING_CLASS::Append ( CharRangeType &&  Str)
inline

Append a string and return a reference to this

◆ Append() [2/3]

template<class CharType >
UE_STRING_CLASS & UE_STRING_CLASS::Append ( CharType *  Str)
inline

Append a valid null-terminated string and return a reference to this

CharType is not const to use this overload for mutable char arrays and call Strlen() instead of getting the static length N from GetNum((&T)[N]). Oddly MSVC ranks a const T* overload over T&& for T[N] while clang picks T&&.

◆ Append() [3/3]

template<class CharType >
UE_STRING_CLASS & UE_STRING_CLASS::Append ( const CharType *  Str,
int32  Count 
)
inline

Append a string and return a reference to this

◆ AppendChar()

UE_STRING_CLASS & UE_STRING_CLASS::AppendChar ( ElementType  InChar)

Append a single character and return a reference to this

◆ AppendChars() [1/5]

void UE_STRING_CLASS::AppendChars ( const ANSICHAR Str,
int32  Count 
)

Appends a character range without null-terminators in it

Parameters
Strcan be null if Count is 0. Can be unterminated, Str[Count] isn't read.

◆ AppendChars() [2/5]

void UE_STRING_CLASS::AppendChars ( const UCS2CHAR Str,
int32  Count 
)

◆ AppendChars() [3/5]

void UE_STRING_CLASS::AppendChars ( const UTF32CHAR Str,
int32  Count 
)

◆ AppendChars() [4/5]

void UE_STRING_CLASS::AppendChars ( const UTF8CHAR Str,
int32  Count 
)

◆ AppendChars() [5/5]

void UE_STRING_CLASS::AppendChars ( const WIDECHAR Str,
int32  Count 
)

◆ Appendf()

template<typename... Types>
UE_STRING_CLASS & UE_STRING_CLASS::Appendf ( UE::Core::TCheckedFormatString< FmtCharType, Types... >  Fmt,
Types...  Args 
)
inline

Just like Printf, but appends the formatted text to the existing string instead.

Returns
a reference to the modified string, so that it can be chained

◆ AppendInt()

void UE_STRING_CLASS::AppendInt ( int32  InNum)

appends the integer InNum to this string

◆ AutoRTFMAssignFromOpenToClosed()

static void UE_STRING_CLASS::AutoRTFMAssignFromOpenToClosed ( UE_STRING_CLASS Closed,
const UE_STRING_CLASS Open 
)
inlinestatic

◆ begin() [1/2]

UE_FORCEINLINE_HINT DataType::RangedForIteratorType UE_STRING_CLASS::begin ( )
inline

DO NOT USE DIRECTLY STL-like iterators to enable range-based for loop support.

◆ begin() [2/2]

UE_FORCEINLINE_HINT DataType::RangedForConstIteratorType UE_STRING_CLASS::begin ( ) const
inline

◆ CheckInvariants()

void UE_STRING_CLASS::CheckInvariants ( ) const
inline

Run slow checks on this string

◆ Chr()

UE_STRING_CLASS UE_STRING_CLASS::Chr ( ElementType  Ch)
static

Returns a string containing only the Ch character

◆ ChrN()

UE_STRING_CLASS UE_STRING_CLASS::ChrN ( int32  NumCharacters,
ElementType  Char 
)
static

Returns a string that is full of a variable number of characters

Parameters
NumCharactersNumber of characters to put into the string
CharCharacter to put into the string
Returns
The string of NumCharacters characters.

◆ Compare()

int32 UE_STRING_CLASS::Compare ( const UE_STRING_CLASS Other,
ESearchCase::Type  SearchCase = ESearchCase::CaseSensitive 
) const
inline

Lexicographically tests how this string compares to the Other given string

Parameters
OtherThe string test against
SearchCaseWhether or not the comparison should ignore case
Returns
0 if equal, negative if less than, positive if greater than

◆ ConstructFromPtrSize() [1/5]

UE_STRING_CLASS UE_STRING_CLASS::ConstructFromPtrSize ( const ANSICHAR Str,
int32  Size 
)
static

Construct from a buffer. If the buffer contains zeros, these will be present in the constructed string.

◆ ConstructFromPtrSize() [2/5]

UE_STRING_CLASS UE_STRING_CLASS::ConstructFromPtrSize ( const UCS2CHAR Str,
int32  Size 
)
static

◆ ConstructFromPtrSize() [3/5]

UE_STRING_CLASS UE_STRING_CLASS::ConstructFromPtrSize ( const UTF32CHAR Str,
int32  Size 
)
static

◆ ConstructFromPtrSize() [4/5]

UE_STRING_CLASS UE_STRING_CLASS::ConstructFromPtrSize ( const UTF8CHAR Str,
int32  Size 
)
static

◆ ConstructFromPtrSize() [5/5]

UE_STRING_CLASS UE_STRING_CLASS::ConstructFromPtrSize ( const WIDECHAR Str,
int32  Size 
)
static

◆ ConstructFromPtrSizeWithSlack() [1/5]

UE_STRING_CLASS UE_STRING_CLASS::ConstructFromPtrSizeWithSlack ( const ANSICHAR Str,
int32  Size,
int32  ExtraSlack 
)
static

Construct from a buffer with extra slack on top of original string length. If the buffer contains zeros, these will be present in the constructed string.

◆ ConstructFromPtrSizeWithSlack() [2/5]

UE_STRING_CLASS UE_STRING_CLASS::ConstructFromPtrSizeWithSlack ( const UCS2CHAR Str,
int32  Size,
int32  ExtraSlack 
)
static

◆ ConstructFromPtrSizeWithSlack() [3/5]

UE_STRING_CLASS UE_STRING_CLASS::ConstructFromPtrSizeWithSlack ( const UTF32CHAR Str,
int32  Size,
int32  ExtraSlack 
)
static

◆ ConstructFromPtrSizeWithSlack() [4/5]

UE_STRING_CLASS UE_STRING_CLASS::ConstructFromPtrSizeWithSlack ( const UTF8CHAR Str,
int32  Size,
int32  ExtraSlack 
)
static

◆ ConstructFromPtrSizeWithSlack() [5/5]

UE_STRING_CLASS UE_STRING_CLASS::ConstructFromPtrSizeWithSlack ( const WIDECHAR Str,
int32  Size,
int32  ExtraSlack 
)
static

◆ ConstructWithSlack() [1/5]

UE_STRING_CLASS UE_STRING_CLASS::ConstructWithSlack ( const ANSICHAR Str,
int32  ExtraSlack 
)
static

Construct from null-terminated C string with extra slack on top of original string length.

◆ ConstructWithSlack() [2/5]

UE_STRING_CLASS UE_STRING_CLASS::ConstructWithSlack ( const UCS2CHAR Str,
int32  ExtraSlack 
)
static

◆ ConstructWithSlack() [3/5]

UE_STRING_CLASS UE_STRING_CLASS::ConstructWithSlack ( const UTF32CHAR Str,
int32  ExtraSlack 
)
static

◆ ConstructWithSlack() [4/5]

UE_STRING_CLASS UE_STRING_CLASS::ConstructWithSlack ( const UTF8CHAR Str,
int32  ExtraSlack 
)
static

◆ ConstructWithSlack() [5/5]

UE_STRING_CLASS UE_STRING_CLASS::ConstructWithSlack ( const WIDECHAR Str,
int32  ExtraSlack 
)
static

◆ Contains() [1/4]

template<typename CharRangeType , typename CharRangeElementType = TElementType_T<CharRangeType> UE_REQUIRES( TIsContiguousContainer<CharRangeType>::Value && !std::is_array_v<std::remove_reference_t<CharRangeType>>&& TIsCharType_V<CharRangeElementType> && !std::is_base_of_v<UE_STRING_CLASS, std::decay_t<CharRangeType>> )>
bool UE_STRING_CLASS::Contains ( CharRangeType &&  SubStr,
ESearchCase::Type  SearchCase = ESearchCase::IgnoreCase,
ESearchDir::Type  SearchDir = ESearchDir::FromStart 
) const
inline

Returns whether this string contains the specified substring.

Parameters
SubStrText to search for
SearchCaseIndicates whether the search is case sensitive or not (defaults to ESearchCase::IgnoreCase)
SearchDirIndicates whether the search starts at the beginning or at the end (defaults to ESearchDir::FromStart)
Returns
Returns whether the string contains the substring. If the substring is empty, returns true.

◆ Contains() [2/4]

UE_FORCEINLINE_HINT bool UE_STRING_CLASS::Contains ( const ElementType SubStr,
ESearchCase::Type  SearchCase = ESearchCase::IgnoreCase,
ESearchDir::Type  SearchDir = ESearchDir::FromStart 
) const
inline

Returns whether this string contains the specified substring.

Parameters
SubStrText to search for
SearchCaseIndicates whether the search is case sensitive or not (defaults to ESearchCase::IgnoreCase)
SearchDirIndicates whether the search starts at the beginning or at the end (defaults to ESearchDir::FromStart)
Returns
Returns whether the string contains the substring. If the substring is empty, returns true.

◆ Contains() [3/4]

UE_FORCEINLINE_HINT bool UE_STRING_CLASS::Contains ( const ElementType SubStr,
int32  SubStrLen,
ESearchCase::Type  SearchCase = ESearchCase::IgnoreCase,
ESearchDir::Type  SearchDir = ESearchDir::FromStart 
) const
inline

Returns whether this string contains the specified substring.

Parameters
SubStrText to search for
SubStrLenLength of the Text
SearchCaseIndicates whether the search is case sensitive or not (defaults to ESearchCase::IgnoreCase)
SearchDirIndicates whether the search starts at the beginning or at the end (defaults to ESearchDir::FromStart)
Returns
Returns whether the string contains the substring. If the substring is empty, returns true.

◆ Contains() [4/4]

UE_FORCEINLINE_HINT bool UE_STRING_CLASS::Contains ( const UE_STRING_CLASS SubStr,
ESearchCase::Type  SearchCase = ESearchCase::IgnoreCase,
ESearchDir::Type  SearchDir = ESearchDir::FromStart 
) const
inline

Returns whether this string contains the specified substring.

Parameters
SubStrText to search for
SearchCaseIndicates whether the search is case sensitive or not (defaults to ESearchCase::IgnoreCase)
SearchDirIndicates whether the search starts at the beginning or at the end (defaults to ESearchDir::FromStart)
Returns
Returns whether the string contains the substring. If the substring is empty, returns true.

◆ ConvertTabsToSpaces() [1/2]

UE_STRING_CLASS UE_STRING_CLASS::ConvertTabsToSpaces ( const int32  InSpacesPerTab) &&
inline

Replaces all instances of '\t' with TabWidth number of spaces

Parameters
InSpacesPerTab- Number of spaces that a tab represents
Returns
copy of this string with replacement made

◆ ConvertTabsToSpaces() [2/2]

UE_STRING_CLASS UE_STRING_CLASS::ConvertTabsToSpaces ( const int32  InSpacesPerTab) const &
inline

Replaces all instances of '\t' with TabWidth number of spaces

Parameters
InSpacesPerTab- Number of spaces that a tab represents
Returns
copy of this string with replacement made

◆ ConvertTabsToSpacesInline()

void UE_STRING_CLASS::ConvertTabsToSpacesInline ( const int32  InSpacesPerTab)

Replaces all instances of '\t' with TabWidth number of spaces

Parameters
InSpacesPerTab- Number of spaces that a tab represents

◆ CountBytes()

UE_FORCEINLINE_HINT void UE_STRING_CLASS::CountBytes ( FArchive Ar) const
inline

◆ CreateConstIterator()

UE_FORCEINLINE_HINT TConstIterator UE_STRING_CLASS::CreateConstIterator ( ) const
inline

Creates a const iterator for the characters in this string

◆ CreateIterator()

UE_FORCEINLINE_HINT TIterator UE_STRING_CLASS::CreateIterator ( )
inline

Creates an iterator for the characters in this string

◆ CullArray()

int32 UE_STRING_CLASS::CullArray ( TArray< UE_STRING_CLASS > *  InOutArray)
static

Takes an array of strings and removes any zero length entries.

Parameters
InOutArrayThe array to cull
Returns
The number of elements left in InOutArray

◆ Empty() [1/2]

void UE_STRING_CLASS::Empty ( )

Create empty string of given size with zero terminating character

Parameters
Slacklength of empty string to create

◆ Empty() [2/2]

void UE_STRING_CLASS::Empty ( int32  Slack)

◆ end() [1/2]

UE_FORCEINLINE_HINT DataType::RangedForIteratorType UE_STRING_CLASS::end ( )
inline

◆ end() [2/2]

UE_FORCEINLINE_HINT DataType::RangedForConstIteratorType UE_STRING_CLASS::end ( ) const
inline

◆ EndsWith() [1/4]

template<typename CharRangeType , typename CharRangeElementType = TElementType_T<CharRangeType> UE_REQUIRES( TIsContiguousContainer<CharRangeType>::Value && !std::is_array_v<std::remove_reference_t<CharRangeType>>&& TIsCharType_V<CharRangeElementType> && !std::is_base_of_v<UE_STRING_CLASS, std::decay_t<CharRangeType>> )>
bool UE_STRING_CLASS::EndsWith ( CharRangeType &&  InSuffix,
ESearchCase::Type  SearchCase = ESearchCase::IgnoreCase 
) const
inline

Test whether this string ends with given suffix.

Parameters
InSuffixThe suffix to search for at the end of the string.
SearchCaseIndicates whether the search is case sensitive or not (defaults to ESearchCase::IgnoreCase)
Returns
true if this string ends with specified text, false otherwise

◆ EndsWith() [2/4]

bool UE_STRING_CLASS::EndsWith ( const ElementType InSuffix,
ESearchCase::Type  SearchCase = ESearchCase::IgnoreCase 
) const
inline

Test whether this string ends with given suffix.

Parameters
InSuffixThe suffix to search for at the end of the string.
SearchCaseIndicates whether the search is case sensitive or not (defaults to ESearchCase::IgnoreCase)
Returns
true if this string ends with specified text, false otherwise

◆ EndsWith() [3/4]

bool UE_STRING_CLASS::EndsWith ( const ElementType InSuffix,
int32  InSuffixLen,
ESearchCase::Type  SearchCase = ESearchCase::IgnoreCase 
) const

Test whether this string ends with given suffix.

Parameters
InSuffixThe suffix to search for at the end of the string.
SearchCaseIndicates whether the search is case sensitive or not (defaults to ESearchCase::IgnoreCase)
Returns
true if this string ends with specified text, false otherwise

◆ EndsWith() [4/4]

bool UE_STRING_CLASS::EndsWith ( const UE_STRING_CLASS InSuffix,
ESearchCase::Type  SearchCase = ESearchCase::IgnoreCase 
) const
inline

Test whether this string ends with given suffix.

Parameters
InSuffixThe suffix to search for at the end of the string.
SearchCaseIndicates whether the search is case sensitive or not (defaults to ESearchCase::IgnoreCase)
Returns
true if this string ends with specified text, false otherwise

◆ Equals()

bool UE_STRING_CLASS::Equals ( const UE_STRING_CLASS Other,
ESearchCase::Type  SearchCase = ESearchCase::CaseSensitive 
) const
inline

Lexicographically tests whether this string is equivalent to the Other given string

Parameters
OtherThe string test against
SearchCaseWhether or not the comparison should ignore case
Returns
true if this string is lexicographically equivalent to the other, otherwise false

◆ Find() [1/4]

template<typename CharRangeType , typename CharRangeElementType = TElementType_T<CharRangeType> UE_REQUIRES( TIsContiguousContainer<CharRangeType>::Value && !std::is_array_v<std::remove_reference_t<CharRangeType>>&& TIsCharType_V<CharRangeElementType> && !std::is_base_of_v<UE_STRING_CLASS, std::decay_t<CharRangeType>> )>
int32 UE_STRING_CLASS::Find ( CharRangeType &&  SubStr,
ESearchCase::Type  SearchCase = ESearchCase::IgnoreCase,
ESearchDir::Type  SearchDir = ESearchDir::FromStart,
int32  StartPosition = INDEX_NONE 
) const
inline

Searches the string for a substring. Can search from beginning or end, and ignore case or not.

Parameters
SubStrThe string to search for
SearchCaseIndicates whether the search is case sensitive or not (defaults to ESearchCase::IgnoreCase)
SearchDirIndicates whether the search starts at the beginning or at the end (defaults to ESearchDir::FromStart)
StartPositionThe start character position to search from
Returns
Index into this string of the first found instance. If SubStr is empty, returns clamped StartPosition.
Note
When searching backwards where a StartPosition is provided, searching will actually begin from StartPosition - GetNum(SubStr), therefore:

FString("X").Find("X", ESearchCase::CaseSensitive, ESearchDir::FromEnd, 0) == INDEX_NONE

Consider using UE::String::FindLast() as an alternative.

◆ Find() [2/4]

int32 UE_STRING_CLASS::Find ( const ElementType SubStr,
ESearchCase::Type  SearchCase = ESearchCase::IgnoreCase,
ESearchDir::Type  SearchDir = ESearchDir::FromStart,
int32  StartPosition = INDEX_NONE 
) const
inline

Searches the string for a substring. Can search from beginning or end, and ignore case or not.

Parameters
SubStrThe string array of characters to search for
SearchCaseIndicates whether the search is case sensitive or not
SearchDirIndicates whether the search starts at the beginning or at the end.
StartPositionThe start character position to search from. See note below.
Returns
Index into this string of the first found instance. If SubStr is empty, returns clamped StartPosition.
Note
When searching backwards where a StartPosition is provided, searching will actually begin from StartPosition - Strlen(SubStr), therefore:

FString("X").Find("X", ESearchCase::CaseSensitive, ESearchDir::FromEnd, 0) == INDEX_NONE

Consider using UE::String::FindLast() as an alternative.

◆ Find() [3/4]

int32 UE_STRING_CLASS::Find ( const ElementType SubStr,
int32  InSubStrLen,
ESearchCase::Type  SearchCase = ESearchCase::IgnoreCase,
ESearchDir::Type  SearchDir = ESearchDir::FromStart,
int32  StartPosition = INDEX_NONE 
) const

Searches the string for a substring. Can search from beginning or end, and ignore case or not.

Parameters
SubStrThe string array of characters to search for
SubStrLenThe length of the SubStr array
SearchCaseIndicates whether the search is case sensitive or not
SearchDirIndicates whether the search starts at the beginning or at the end.
StartPositionThe start character position to search from. See note below.
Returns
Index into this string of the first found instance. If SubStr is empty, returns clamped StartPosition.
Note
When searching backwards where a StartPosition is provided, searching will actually begin from StartPosition - InSubStrLen, therefore:

FString("X").Find("X", ESearchCase::CaseSensitive, ESearchDir::FromEnd, 0) == INDEX_NONE

Consider using UE::String::FindLast() as an alternative.

◆ Find() [4/4]

int32 UE_STRING_CLASS::Find ( const UE_STRING_CLASS SubStr,
ESearchCase::Type  SearchCase = ESearchCase::IgnoreCase,
ESearchDir::Type  SearchDir = ESearchDir::FromStart,
int32  StartPosition = INDEX_NONE 
) const
inline

Searches the string for a substring. Can search from beginning or end, and ignore case or not.

Parameters
SubStrThe string array of characters to search for
StartPositionThe start character position to search from. See note below.
SearchCaseIndicates whether the search is case sensitive or not
SearchDirIndicates whether the search starts at the beginning or at the end.
Returns
Index into this string of the first found instance. If SubStr is empty, returns clamped StartPosition.
Note
When searching backwards where a StartPosition is provided, searching will actually begin from StartPosition - SubStr.Len(), therefore:

FString("X").Find("X", ESearchCase::CaseSensitive, ESearchDir::FromEnd, 0) == INDEX_NONE

Consider using UE::String::FindLast() as an alternative.

◆ FindChar()

UE_FORCEINLINE_HINT bool UE_STRING_CLASS::FindChar ( ElementType  InChar,
int32 OutIndex 
) const
inline

Searches the string for a character

Parameters
InCharthe character to search for
OutIndexout the position the character was found at, INDEX_NONE if return is false
Returns
true if character was found in this string, otherwise false

◆ FindLastChar()

UE_FORCEINLINE_HINT bool UE_STRING_CLASS::FindLastChar ( ElementType  InChar,
int32 OutIndex 
) const
inline

Searches the string for the last occurrence of a character

Parameters
InCharthe character to search for
OutIndexout the position the character was found at, INDEX_NONE if return is false
Returns
true if character was found in this string, otherwise false

◆ FindLastCharByPredicate() [1/2]

template<typename Predicate >
UE_FORCEINLINE_HINT int32 UE_STRING_CLASS::FindLastCharByPredicate ( Predicate  Pred) const
inline

Searches the string for the last occurrence of a character which matches the specified predicate.

Parameters
PredPredicate that takes a character and returns true if it matches search criteria, false otherwise.
Returns
Index of the found character, INDEX_NONE otherwise.

◆ FindLastCharByPredicate() [2/2]

template<typename Predicate >
int32 UE_STRING_CLASS::FindLastCharByPredicate ( Predicate  Pred,
int32  Count 
) const
inline

Searches an initial substring for the last occurrence of a character which matches the specified predicate.

Parameters
PredPredicate that takes a character and returns true if it matches search criteria, false otherwise.
CountThe number of characters from the front of the string through which to search.
Returns
Index of the found character, INDEX_NONE otherwise.

◆ Format() [1/2]

static UE_STRING_CLASS UE_STRING_CLASS::Format ( const FmtCharType InFormatString,
const FStringFormatOrderedArguments InOrderedArguments 
)
inlinestatic

Format the specified string using the specified arguments. Replaces instances of {0} with indices from the given array matching the index specified in the token

Parameters
InFormatStringA string representing the format expression
InOrderedArgumentsAn array of ordered arguments that match the tokens specified in InExpression
Returns
A string containing the formatted text

◆ Format() [2/2]

static UE_STRING_CLASS UE_STRING_CLASS::Format ( const FmtCharType InFormatString,
const PREPROCESSOR_JOIN(UE_STRING_CLASS, FormatNamedArguments)&  InNamedArguments 
)
inlinestatic

Format the specified string using the specified arguments. Replaces instances of { Argument } with keys in the map matching 'Argument'

Parameters
InFormatStringA string representing the format expression
InNamedArgumentsA map of named arguments that match the tokens specified in InExpression
Returns
A string containing the formatted text

◆ FormatAsNumber()

UE_STRING_CLASS UE_STRING_CLASS::FormatAsNumber ( int32  InNumber)
static

◆ FromBlob()

UE_STRING_CLASS UE_STRING_CLASS::FromBlob ( const uint8 SrcBuffer,
const uint32  SrcSize 
)
static

Converts a buffer to a string

Parameters
SrcBufferthe buffer to stringify
SrcSizethe number of bytes to convert
Returns
the blob in string form

◆ FromHexBlob()

UE_STRING_CLASS UE_STRING_CLASS::FromHexBlob ( const uint8 SrcBuffer,
const uint32  SrcSize 
)
static

Converts a buffer to a string by hex-ifying the elements

Parameters
SrcBufferthe buffer to stringify
SrcSizethe number of bytes to convert
Returns
the blob in string form

◆ FromInt()

static UE_STRING_CLASS UE_STRING_CLASS::FromInt ( int32  Num)
inlinestatic

Converts an integer to a string.

◆ GetAllocatedSize()

UE_FORCEINLINE_HINT SIZE_T UE_STRING_CLASS::GetAllocatedSize ( ) const
inline

◆ GetCharArray() [1/2]

UE_FORCEINLINE_HINT const DataType & UE_STRING_CLASS::GetCharArray ( ) const
inline

Get string as const array of TCHARS

◆ GetCharArray() [2/2]

UE_FORCEINLINE_HINT DataType & UE_STRING_CLASS::GetCharArray ( )
inline

Get string as array of TCHARS

Warning
: Operations on the TArray<*CHAR> can be unsafe, such as adding non-terminating 0's or removing the terminating zero.

◆ InsertAt() [1/2]

void UE_STRING_CLASS::InsertAt ( int32  Index,
const UE_STRING_CLASS Characters 
)

◆ InsertAt() [2/2]

void UE_STRING_CLASS::InsertAt ( int32  Index,
ElementType  Character 
)

◆ IsEmpty()

UE_FORCEINLINE_HINT bool UE_STRING_CLASS::IsEmpty ( ) const
inline

Test whether this string is empty

Returns
true if this string is empty, otherwise return false.

◆ IsNumeric()

bool UE_STRING_CLASS::IsNumeric ( ) const

Returns true if the string only contains numeric characters

◆ IsValidIndex()

UE_FORCEINLINE_HINT bool UE_STRING_CLASS::IsValidIndex ( int32  Index) const
inline

Tests if index is valid, i.e. greater than or equal to zero, and less than the number of characters in this string (excluding the null terminator).

Parameters
IndexIndex to test.
Returns
True if index is valid. False otherwise.

◆ Join()

template<typename RangeType >
static UE_STRING_CLASS UE_STRING_CLASS::Join ( const RangeType &  Range,
const ElementType Separator 
)
inlinestatic

Joins a range of 'something that can be concatentated to strings with +=' together into a single string with separators.

Parameters
RangeThe range of 'things' to concatenate.
SeparatorThe string used to separate each element.
Returns
The final, joined, separated string.

◆ JoinBy()

template<typename RangeType , typename ProjectionType >
static UE_STRING_CLASS UE_STRING_CLASS::JoinBy ( const RangeType &  Range,
const ElementType Separator,
ProjectionType  Proj 
)
inlinestatic

Joins a range of elements together into a single string with separators using a projection function.

Parameters
RangeThe range of 'things' to concatenate.
SeparatorThe string used to separate each element.
ProjThe projection used to get a string for each element.
Returns
The final, joined, separated string.

◆ Left() [1/2]

UE_STRING_CLASS UE_STRING_CLASS::Left ( int32  Count) &&
inline

◆ Left() [2/2]

UE_FORCEINLINE_HINT UE_STRING_CLASS UE_STRING_CLASS::Left ( int32  Count) const &
inline

Returns the left most given number of characters

◆ LeftChop() [1/2]

UE_STRING_CLASS UE_STRING_CLASS::LeftChop ( int32  Count) &&
inline

◆ LeftChop() [2/2]

UE_STRING_CLASS UE_STRING_CLASS::LeftChop ( int32  Count) const &
inline

Returns the left most characters from the string chopping the given number of characters from the end

◆ LeftChopInline() [1/2]

UE_FORCEINLINE_HINT void UE_STRING_CLASS::LeftChopInline ( int32  Count,
bool  bAllowShrinking 
)
inline

◆ LeftChopInline() [2/2]

void UE_STRING_CLASS::LeftChopInline ( int32  Count,
EAllowShrinking  AllowShrinking = EAllowShrinking::Default 
)
inline

Modifies the string such that it is now the left most characters chopping the given number of characters from the end

◆ LeftInline() [1/2]

UE_FORCEINLINE_HINT void UE_STRING_CLASS::LeftInline ( int32  Count,
bool  bAllowShrinking 
)
inline

◆ LeftInline() [2/2]

void UE_STRING_CLASS::LeftInline ( int32  Count,
EAllowShrinking  AllowShrinking = EAllowShrinking::Default 
)
inline

Modifies the string such that it is now the left most given number of characters

◆ LeftPad()

UE_STRING_CLASS UE_STRING_CLASS::LeftPad ( int32  ChCount) const

Pad the left of this string for ChCount characters

◆ Len()

UE_FORCEINLINE_HINT int32 UE_STRING_CLASS::Len ( ) const
inline

Get the length of the string, excluding terminating character

◆ MatchesWildcard() [1/4]

template<typename CharRangeType , typename CharRangeElementType = TElementType_T<CharRangeType> UE_REQUIRES( TIsContiguousContainer<CharRangeType>::Value && !std::is_array_v<std::remove_reference_t<CharRangeType>>&& TIsCharType_V<CharRangeElementType> && !std::is_base_of_v<UE_STRING_CLASS, std::decay_t<CharRangeType>> )>
bool UE_STRING_CLASS::MatchesWildcard ( CharRangeType &&  Wildcard,
ESearchCase::Type  SearchCase = ESearchCase::IgnoreCase 
) const
inline

Searches this string for a given wild card

Parameters
Wildcard*?-type wildcard
SearchCaseIndicates whether the search is case sensitive or not (defaults to ESearchCase::IgnoreCase)
Returns
true if this string matches the *?-type wildcard given.
Warning
This is a simple, SLOW routine. Use with caution

◆ MatchesWildcard() [2/4]

bool UE_STRING_CLASS::MatchesWildcard ( const ElementType Wildcard,
ESearchCase::Type  SearchCase = ESearchCase::IgnoreCase 
) const
inline

Searches this string for a given wild card

Parameters
Wildcard*?-type wildcard
SearchCaseIndicates whether the search is case sensitive or not (defaults to ESearchCase::IgnoreCase)
Returns
true if this string matches the *?-type wildcard given.
Warning
This is a simple, SLOW routine. Use with caution

◆ MatchesWildcard() [3/4]

bool UE_STRING_CLASS::MatchesWildcard ( const ElementType Wildcard,
int32  WildcardLen,
ESearchCase::Type  SearchCase = ESearchCase::IgnoreCase 
) const

Searches this string for a given wild card

Parameters
Wildcard*?-type wildcard
WildcardLenThe length of Wildcard
SearchCaseIndicates whether the search is case sensitive or not (defaults to ESearchCase::IgnoreCase)
Returns
true if this string matches the *?-type wildcard given.
Warning
This is a simple, SLOW routine. Use with caution

◆ MatchesWildcard() [4/4]

bool UE_STRING_CLASS::MatchesWildcard ( const UE_STRING_CLASS Wildcard,
ESearchCase::Type  SearchCase = ESearchCase::IgnoreCase 
) const
inline

Searches this string for a given wild card

Parameters
Wildcard*?-type wildcard
SearchCaseIndicates whether the search is case sensitive or not (defaults to ESearchCase::IgnoreCase)
Returns
true if this string matches the *?-type wildcard given.
Warning
This is a simple, SLOW routine. Use with caution

◆ Mid() [1/4]

UE_FORCEINLINE_HINT UE_STRING_CLASS UE_STRING_CLASS::Mid ( int32  Start) &&
inline

◆ Mid() [2/4]

UE_FORCEINLINE_HINT UE_STRING_CLASS UE_STRING_CLASS::Mid ( int32  Start) const &
inline

Returns the substring from Start position to the end

◆ Mid() [3/4]

UE_STRING_CLASS UE_STRING_CLASS::Mid ( int32  Start,
int32  Count 
) &&

◆ Mid() [4/4]

UE_STRING_CLASS UE_STRING_CLASS::Mid ( int32  Start,
int32  Count 
) const &

Returns the substring from Start position for Count characters.

◆ MidInline() [1/2]

UE_FORCEINLINE_HINT void UE_STRING_CLASS::MidInline ( int32  Start,
int32  Count,
bool  bAllowShrinking 
)
inline

◆ MidInline() [2/2]

void UE_STRING_CLASS::MidInline ( int32  Start,
int32  Count = MAX_int32,
EAllowShrinking  AllowShrinking = EAllowShrinking::Default 
)
inline

Modifies the string such that it is now the substring from Start position for Count characters.

◆ NumBytesWithNull()

UE_FORCEINLINE_HINT SIZE_T UE_STRING_CLASS::NumBytesWithNull ( ) const
inline
Returns
Number of bytes used for characters, including the null-terminator but excluding slack

◆ NumBytesWithoutNull()

UE_FORCEINLINE_HINT SIZE_T UE_STRING_CLASS::NumBytesWithoutNull ( ) const
inline
Returns
Number of bytes used for characters, excluding the null-terminator and slack

◆ operator*()

UE_FORCEINLINE_HINT const ElementType * UE_STRING_CLASS::operator* ( ) const
inline

Get pointer to the string

@Return Pointer to Array of ElementType if Num, otherwise the empty string

◆ operator+=() [1/2]

UE_STRING_CLASS & UE_STRING_CLASS::operator+= ( AppendedCharType  Char)
inline

Append a single character and return a reference to this

◆ operator+=() [2/2]

template<typename StrType >
UE_FORCEINLINE_HINT auto UE_STRING_CLASS::operator+= ( StrType &&  Str) -> decltype(Append(Forward<StrType>(Str)))
inline

Append a string and return a reference to this

◆ operator/=() [1/3]

template<typename CharRangeType , typename CharRangeElementType = TElementType_T<CharRangeType> UE_REQUIRES( TIsContiguousContainer<CharRangeType>::Value && !std::is_array_v<std::remove_reference_t<CharRangeType>>&& std::is_same_v<ElementType, CharRangeElementType> )>
UE_STRING_CLASS & UE_STRING_CLASS::operator/= ( CharRangeType &&  Str)
inline

Concatenate this path with given path ensuring the / character is used between them

Parameters
Strpath range of CharType (string class/string view/string builder etc) to be concatenated onto the end of this
Returns
reference to path

◆ operator/=() [2/3]

template<typename CharType >
UE_STRING_CLASS & UE_STRING_CLASS::operator/= ( const CharType *  Str)
inline

Concatenate this path with given path ensuring the / character is used between them

Parameters
Strpath array of CharType (that needs converting) to be concatenated onto the end of this
Returns
reference to path

◆ operator/=() [3/3]

UE_STRING_CLASS & UE_STRING_CLASS::operator/= ( const ElementType Str)
inline

Concatenate this path with given path ensuring the / character is used between them

Parameters
Strpath array of characters to be concatenated onto the end of this
Returns
reference to path

◆ operator=() [1/4]

template<typename CharRangeType , typename CharRangeElementType = TElementType_T<CharRangeType> UE_REQUIRES( TIsContiguousContainer<CharRangeType>::Value && !std::is_array_v<std::remove_reference_t<CharRangeType>> && std::is_same_v<ElementType, CharRangeElementType> )>
UE_STRING_CLASS & UE_STRING_CLASS::operator= ( CharRangeType &&  Range)
inline

◆ operator=() [2/4]

UE_STRING_CLASS & UE_STRING_CLASS::operator= ( const ElementType Str)

◆ operator=() [3/4]

UE_STRING_CLASS & UE_STRING_CLASS::operator= ( const UE_STRING_CLASS )
default

◆ operator=() [4/4]

UE_STRING_CLASS & UE_STRING_CLASS::operator= ( UE_STRING_CLASS &&  )
default

◆ operator[]() [1/2]

const ElementType & UE_STRING_CLASS::operator[] ( int32  Index) const
inline

Return specific const character from this string

Parameters
Indexinto string
Returns
const Character at Index

◆ operator[]() [2/2]

ElementType & UE_STRING_CLASS::operator[] ( int32  Index)
inline

Return specific character from this string

Parameters
Indexinto string
Returns
Character at Index

◆ ParseIntoArray() [1/2]

int32 UE_STRING_CLASS::ParseIntoArray ( TArray< UE_STRING_CLASS > &  OutArray,
const ElementType *const *  DelimArray,
int32  NumDelims,
bool  bInCullEmpty = true 
) const

Breaks up a delimited string into elements of a string array, using the given delimiters

Warning
Caution!! this routine is O(N^2) allocations...use it for parsing very short text or not at all!
Parameters
OutArrayThe array to fill with the string pieces
DelimArrayThe strings to delimit on
NumDelimsThe number of delimiters.
bInCullEmptyIf true, empty strings are not added to the array
Returns
The number of elements in OutArray

◆ ParseIntoArray() [2/2]

int32 UE_STRING_CLASS::ParseIntoArray ( TArray< UE_STRING_CLASS > &  OutArray,
const ElementType pchDelim,
bool  bInCullEmpty = true 
) const

Breaks up a delimited string into elements of a string array.

Parameters
OutArrayThe array to fill with the string pieces
pchDelimThe string to delimit on
bInCullEmptyIf true, empty strings are not added to the array
Returns
The number of elements in OutArray

◆ ParseIntoArrayLines()

int32 UE_STRING_CLASS::ParseIntoArrayLines ( TArray< UE_STRING_CLASS > &  OutArray,
bool  bInCullEmpty = true 
) const

Breaks up a delimited string into elements of a string array, using line ending characters

Warning
Caution!! this routine is O(N^2) allocations...use it for parsing very short text or not at all!
Parameters
OutArrayThe array to fill with the string pieces
bInCullEmptyIf true, empty strings are not added to the array
Returns
The number of elements in OutArray

◆ ParseIntoArrayWS()

int32 UE_STRING_CLASS::ParseIntoArrayWS ( TArray< UE_STRING_CLASS > &  OutArray,
const ElementType pchExtraDelim = nullptr,
bool  bInCullEmpty = true 
) const

Breaks up a delimited string into elements of a string array, using any whitespace and an optional extra delimter, like a ","

Warning
Caution!! this routine is O(N^2) allocations...use it for parsing very short text or not at all!
Parameters
OutArrayThe array to fill with the string pieces
pchExtraDelimThe string to delimit on
bInCullEmptyIf true, empty strings are not added to the array
Returns
The number of elements in OutArray

Caution!! this routine is O(N^2) allocations...use it for parsing very short text or not at all

◆ PathAppend()

void UE_STRING_CLASS::PathAppend ( const ElementType Str,
int32  StrLength 
)

Concatenate this path with given path ensuring the / character is used between them

Parameters
StrPointer to an array of TCHARs (not necessarily null-terminated) to be concatenated onto the end of this.
StrLengthExact number of characters from Str to append.

◆ Printf()

template<typename... Types>
static UE_STRING_CLASS UE_STRING_CLASS::Printf ( UE::Core::TCheckedFormatString< FmtCharType, Types... >  Fmt,
Types...  Args 
)
inlinestatic

Constructs a string similarly to how classic sprintf works.

Parameters
FmtFormat string that specifies how the string should be built optionally using additional args. Refer to standard printf format.
...Depending on format function may require additional arguments to build output object.
Returns
A string that was constructed using format and additional parameters.

◆ rbegin() [1/2]

UE_FORCEINLINE_HINT DataType::RangedForReverseIteratorType UE_STRING_CLASS::rbegin ( )
inline

◆ rbegin() [2/2]

UE_FORCEINLINE_HINT DataType::RangedForConstReverseIteratorType UE_STRING_CLASS::rbegin ( ) const
inline

◆ RemoveAt() [1/3]

void UE_STRING_CLASS::RemoveAt ( int32  Index,
EAllowShrinking  AllowShrinking = EAllowShrinking::Default 
)

Removes a character from the string.

Parameters
IndexThe index of the character to remove.
AllowShrinkingWhether or not to reallocate to shrink the storage after removal.

◆ RemoveAt() [2/3]

UE_FORCEINLINE_HINT void UE_STRING_CLASS::RemoveAt ( int32  Index,
int32  Count,
bool  bAllowShrinking 
)
inline

◆ RemoveAt() [3/3]

void UE_STRING_CLASS::RemoveAt ( int32  Index,
int32  Count,
EAllowShrinking  AllowShrinking = EAllowShrinking::Default 
)

Removes characters within the string.

Parameters
IndexThe index of the first character to remove.
CountThe number of characters to remove.
AllowShrinkingWhether or not to reallocate to shrink the storage after removal.

◆ RemoveFromEnd() [1/4]

template<typename CharRangeType , typename CharRangeElementType = TElementType_T<CharRangeType> UE_REQUIRES( TIsContiguousContainer<CharRangeType>::Value && !std::is_array_v<std::remove_reference_t<CharRangeType>>&& TIsCharType_V<CharRangeElementType> && !std::is_base_of_v<UE_STRING_CLASS, std::decay_t<CharRangeType>> )>
bool UE_STRING_CLASS::RemoveFromEnd ( CharRangeType &&  InSuffix,
ESearchCase::Type  SearchCase = ESearchCase::IgnoreCase 
)
inline

Removes the text from the end of the string if it exists.

Parameters
InSuffixThe suffix to search for at the end of the string to remove.
SearchCaseIndicates whether the search is case sensitive or not (defaults to ESearchCase::IgnoreCase)
Returns
true if the suffix was removed, otherwise false.

◆ RemoveFromEnd() [2/4]

bool UE_STRING_CLASS::RemoveFromEnd ( const ElementType InSuffix,
ESearchCase::Type  SearchCase = ESearchCase::IgnoreCase 
)
inline

Removes the text from the end of the string if it exists.

Parameters
InSuffixThe suffix to search for at the end of the string to remove.
SearchCaseIndicates whether the search is case sensitive or not (defaults to ESearchCase::IgnoreCase)
Returns
true if the suffix was removed, otherwise false.

◆ RemoveFromEnd() [3/4]

bool UE_STRING_CLASS::RemoveFromEnd ( const ElementType InSuffix,
int32  InSuffixLen,
ESearchCase::Type  SearchCase = ESearchCase::IgnoreCase 
)

Removes the text from the end of the string if it exists.

Parameters
InSuffixThe suffix to search for at the end of the string to remove.
InSuffixLenThe length of InSuffix
SearchCaseIndicates whether the search is case sensitive or not (defaults to ESearchCase::IgnoreCase)
Returns
true if the suffix was removed, otherwise false.

◆ RemoveFromEnd() [4/4]

bool UE_STRING_CLASS::RemoveFromEnd ( const UE_STRING_CLASS InSuffix,
ESearchCase::Type  SearchCase = ESearchCase::IgnoreCase 
)
inline

Removes the text from the end of the string if it exists.

Parameters
InSuffixThe suffix to search for at the end of the string to remove.
SearchCaseIndicates whether the search is case sensitive or not (defaults to ESearchCase::IgnoreCase)
Returns
true if the suffix was removed, otherwise false.

◆ RemoveFromStart() [1/4]

template<typename CharRangeType , typename CharRangeElementType = TElementType_T<CharRangeType> UE_REQUIRES( TIsContiguousContainer<CharRangeType>::Value && !std::is_array_v<std::remove_reference_t<CharRangeType>>&& TIsCharType_V<CharRangeElementType> && !std::is_base_of_v<UE_STRING_CLASS, std::decay_t<CharRangeType>> )>
bool UE_STRING_CLASS::RemoveFromStart ( CharRangeType &&  InPrefix,
ESearchCase::Type  SearchCase = ESearchCase::IgnoreCase 
)
inline

Removes the text from the start of the string if it exists.

Parameters
InPrefixThe prefix to search for at the start of the string to remove.
SearchCaseIndicates whether the search is case sensitive or not (defaults to ESearchCase::IgnoreCase)
Returns
true if the prefix was removed, otherwise false.

◆ RemoveFromStart() [2/4]

bool UE_STRING_CLASS::RemoveFromStart ( const ElementType InPrefix,
ESearchCase::Type  SearchCase = ESearchCase::IgnoreCase 
)
inline

Removes the text from the start of the string if it exists.

Parameters
InPrefixThe prefix to search for at the start of the string to remove.
SearchCaseIndicates whether the search is case sensitive or not (defaults to ESearchCase::IgnoreCase)
Returns
true if the prefix was removed, otherwise false.

◆ RemoveFromStart() [3/4]

bool UE_STRING_CLASS::RemoveFromStart ( const ElementType InPrefix,
int32  InPrefixLen,
ESearchCase::Type  SearchCase = ESearchCase::IgnoreCase 
)

Removes the text from the start of the string if it exists.

Parameters
InPrefixThe prefix to search for at the start of the string to remove.
InPrefixLenThe length of InPrefix
Returns
true if the prefix was removed, otherwise false.

◆ RemoveFromStart() [4/4]

bool UE_STRING_CLASS::RemoveFromStart ( const UE_STRING_CLASS InPrefix,
ESearchCase::Type  SearchCase = ESearchCase::IgnoreCase 
)
inline

Removes the text from the start of the string if it exists.

Parameters
InPrefixThe prefix to search for at the start of the string to remove.
SearchCaseIndicates whether the search is case sensitive or not (defaults to ESearchCase::IgnoreCase)
Returns
true if the prefix was removed, otherwise false.

◆ RemoveSpacesInline()

void UE_STRING_CLASS::RemoveSpacesInline ( )

Removes spaces from the string. I.E. "Spaces Are Cool" --> "SpacesAreCool".

◆ rend() [1/2]

◆ rend() [2/2]

UE_FORCEINLINE_HINT DataType::RangedForConstReverseIteratorType UE_STRING_CLASS::rend ( ) const
inline

◆ Replace() [1/2]

UE_STRING_CLASS UE_STRING_CLASS::Replace ( const ElementType From,
const ElementType To,
ESearchCase::Type  SearchCase = ESearchCase::IgnoreCase 
) &&

Returns a copy of the string with all occurrences of a substring replaced.

Parameters
FromThe substring to replace.
ToThe substring to insert in its place.
SearchCaseIndicates whether the search is case sensitive or not (defaults to ESearchCase::IgnoreCase)
Returns
a copy of this string with the replacement made

◆ Replace() [2/2]

UE_STRING_CLASS UE_STRING_CLASS::Replace ( const ElementType From,
const ElementType To,
ESearchCase::Type  SearchCase = ESearchCase::IgnoreCase 
) const &

Returns a copy of the string with all occurrences of a substring replaced.

Parameters
FromThe substring to replace.
ToThe substring to insert in its place.
SearchCaseIndicates whether the search is case sensitive or not (defaults to ESearchCase::IgnoreCase)
Returns
a copy of this string with the replacement made

◆ ReplaceCharInline()

void UE_STRING_CLASS::ReplaceCharInline ( ElementType  From,
ElementType  To,
ESearchCase::Type  SearchCase = ESearchCase::IgnoreCase 
)
inline

Replaces all occurrences of a character in this string.

Parameters
SearchCharCharacter to remove from this string
ReplacementCharReplacement character
SearchCaseIndicates whether the search is case sensitive or not (defaults to ESearchCase::IgnoreCase)
Note
no dynamic allocation

◆ ReplaceCharWithEscapedChar() [1/2]

UE_STRING_CLASS UE_STRING_CLASS::ReplaceCharWithEscapedChar ( const TArray< ElementType > *  Chars = nullptr) &&
inline

Replaces certain characters with the "escaped" version of that character (i.e. replaces "\n" with "\\n"). The characters supported are: {
, \r, \t, \', ", \ }.

Parameters
Charsby default, replaces all supported characters; this parameter allows you to limit the replacement to a subset.
Returns
a string with all control characters replaced by the escaped version.

◆ ReplaceCharWithEscapedChar() [2/2]

UE_STRING_CLASS UE_STRING_CLASS::ReplaceCharWithEscapedChar ( const TArray< ElementType > *  Chars = nullptr) const &
inline

Replaces certain characters with the "escaped" version of that character (i.e. replaces "\n" with "\\n"). The characters supported are: {
, \r, \t, \', ", \ }.

Parameters
Charsby default, replaces all supported characters; this parameter allows you to limit the replacement to a subset.
Returns
a string with all control characters replaced by the escaped version.

◆ ReplaceCharWithEscapedCharInline()

void UE_STRING_CLASS::ReplaceCharWithEscapedCharInline ( const TArray< ElementType > *  Chars = nullptr)

Replaces certain characters with the "escaped" version of that character (i.e. replaces "\n" with "\\n"). The characters supported are: {
, \r, \t, \', ", \ }.

Parameters
Charsby default, replaces all supported characters; this parameter allows you to limit the replacement to a subset.

◆ ReplaceEscapedCharWithChar() [1/2]

UE_STRING_CLASS UE_STRING_CLASS::ReplaceEscapedCharWithChar ( const TArray< ElementType > *  Chars = nullptr) &&
inline

Removes the escape backslash for all supported characters, replacing the escape and character with the non-escaped version. (i.e. replaces "\\n" with "\n". Counterpart to ReplaceCharWithEscapedChar().

Returns
copy of this string with replacement made

◆ ReplaceEscapedCharWithChar() [2/2]

UE_STRING_CLASS UE_STRING_CLASS::ReplaceEscapedCharWithChar ( const TArray< ElementType > *  Chars = nullptr) const &
inline

Removes the escape backslash for all supported characters, replacing the escape and character with the non-escaped version. (i.e. replaces "\\n" with "\n". Counterpart to ReplaceCharWithEscapedChar().

Returns
copy of this string with replacement made

◆ ReplaceEscapedCharWithCharInline()

void UE_STRING_CLASS::ReplaceEscapedCharWithCharInline ( const TArray< ElementType > *  Chars = nullptr)

Removes the escape backslash for all supported characters, replacing the escape and character with the non-escaped version. (i.e. replaces "\\n" with "\n". Counterpart to ReplaceCharWithEscapedCharInline().

◆ ReplaceInline()

int32 UE_STRING_CLASS::ReplaceInline ( const ElementType SearchText,
const ElementType ReplacementText,
ESearchCase::Type  SearchCase = ESearchCase::IgnoreCase 
)

Replaces all occurrences of a substring in this string.

Parameters
FromThe substring to replace.
ToThe substring to insert in its place.
SearchCaseIndicates whether the search is case sensitive or not (defaults to ESearchCase::IgnoreCase)
Returns
the number of occurrences of SearchText that were replaced.

◆ ReplaceQuotesWithEscapedQuotes() [1/2]

UE_STRING_CLASS UE_STRING_CLASS::ReplaceQuotesWithEscapedQuotes ( ) &&

Returns a copy of this string with all quote marks escaped (unless the quote is already escaped)

◆ ReplaceQuotesWithEscapedQuotes() [2/2]

UE_STRING_CLASS UE_STRING_CLASS::ReplaceQuotesWithEscapedQuotes ( ) const &
inline

Returns a copy of this string with all quote marks escaped (unless the quote is already escaped)

◆ Reserve()

void UE_STRING_CLASS::Reserve ( int32  CharacterCount)

◆ Reset()

void UE_STRING_CLASS::Reset ( int32  NewReservedSize = 0)

Empties the string, but doesn't change memory allocation, unless the new size is larger than the current string.

Parameters
NewReservedSizeThe expected usage size (in characters, not including the terminator) after calling this function.

◆ Reverse() [1/2]

UE_STRING_CLASS UE_STRING_CLASS::Reverse ( ) &&

Returns this string, with the characters in reverse order

◆ Reverse() [2/2]

UE_STRING_CLASS UE_STRING_CLASS::Reverse ( ) const &

Returns a copy of this string, with the characters in reverse order

◆ ReverseString()

void UE_STRING_CLASS::ReverseString ( )

Reverses the order of characters in this string

◆ Right() [1/2]

UE_STRING_CLASS UE_STRING_CLASS::Right ( int32  Count) &&
inline

◆ Right() [2/2]

UE_STRING_CLASS UE_STRING_CLASS::Right ( int32  Count) const &
inline

Returns the string to the right of the specified location, counting back from the right (end of the word).

◆ RightChop() [1/2]

UE_STRING_CLASS UE_STRING_CLASS::RightChop ( int32  Count) &&
inline

◆ RightChop() [2/2]

UE_STRING_CLASS UE_STRING_CLASS::RightChop ( int32  Count) const &

Returns the string to the right of the specified location, counting forward from the left (from the beginning of the word).

◆ RightChopInline() [1/2]

UE_FORCEINLINE_HINT void UE_STRING_CLASS::RightChopInline ( int32  Count,
bool  bAllowShrinking 
)
inline

◆ RightChopInline() [2/2]

UE_FORCEINLINE_HINT void UE_STRING_CLASS::RightChopInline ( int32  Count,
EAllowShrinking  AllowShrinking = EAllowShrinking::Default 
)
inline

Modifies the string such that it is now the string to the right of the specified location, counting forward from the left (from the beginning of the word).

◆ RightInline() [1/2]

UE_FORCEINLINE_HINT void UE_STRING_CLASS::RightInline ( int32  Count,
bool  bAllowShrinking 
)
inline

◆ RightInline() [2/2]

void UE_STRING_CLASS::RightInline ( int32  Count,
EAllowShrinking  AllowShrinking = EAllowShrinking::Default 
)
inline

Modifies the string such that it is now the right most given number of characters

◆ RightPad()

UE_STRING_CLASS UE_STRING_CLASS::RightPad ( int32  ChCount) const

Pad the right of this string for ChCount characters

◆ SanitizeFloat()

UE_STRING_CLASS UE_STRING_CLASS::SanitizeFloat ( double  InFloat,
const int32  InMinFractionalDigits = 1 
)
static

Converts a float string with the trailing zeros stripped For example - 1.234 will be "1.234" rather than "1.234000"

Parameters
InFloatThe float to sanitize
InMinFractionalDigitsThe minimum number of fractional digits the number should have (will be padded with zero)
Returns
sanitized string version of float

◆ SerializeAsANSICharArray()

void UE_STRING_CLASS::SerializeAsANSICharArray ( FArchive Ar,
int32  MinCharacters = 0 
) const

Serializes a string as ANSI char array.

Parameters
StringString to serialize
ArArchive to serialize with
MinCharactersMinimum number of characters to serialize.

◆ Shrink()

void UE_STRING_CLASS::Shrink ( )

Remove unallocated empty character space from the end of this string

◆ Split() [1/2]

bool UE_STRING_CLASS::Split ( const UE_STRING_CLASS InStr,
UE_STRING_CLASS LeftS,
UE_STRING_CLASS RightS 
) const

Split with ESearchCase::IgnoreCase and ESearchDir::FromStart. Allows compiler to avoid branches w/o inlining code.

◆ Split() [2/2]

bool UE_STRING_CLASS::Split ( const UE_STRING_CLASS InStr,
UE_STRING_CLASS LeftS,
UE_STRING_CLASS RightS,
ESearchCase::Type  SearchCase,
ESearchDir::Type  SearchDir = ESearchDir::FromStart 
) const

Splits this string at given string position case sensitive.

Parameters
InStrThe string to search and split at
LeftSout the string to the left of InStr, not updated if return is false. LeftS must not point to the same location as RightS, but can point to this.
RightSout the string to the right of InStr, not updated if return is false. RightS must not point to the same location as LeftS, but can point to this.
SearchCaseIndicates whether the search is case sensitive or not (defaults to ESearchCase::IgnoreCase)
SearchDirIndicates whether the search starts at the beginning or at the end (defaults to ESearchDir::FromStart)
Returns
true if string is split, otherwise false

◆ StartsWith() [1/4]

template<typename CharRangeType , typename CharRangeElementType = TElementType_T<CharRangeType> UE_REQUIRES( TIsContiguousContainer<CharRangeType>::Value && !std::is_array_v<std::remove_reference_t<CharRangeType>>&& TIsCharType_V<CharRangeElementType> && !std::is_base_of_v<UE_STRING_CLASS, std::decay_t<CharRangeType>> )>
bool UE_STRING_CLASS::StartsWith ( CharRangeType &&  InPrefix,
ESearchCase::Type  SearchCase = ESearchCase::IgnoreCase 
) const
inline

Test whether this string starts with given prefix.

Parameters
InPrefixThe prefix to search for at the start of the string.
SearchCaseIndicates whether the search is case sensitive or not (defaults to ESearchCase::IgnoreCase)
Returns
true if this string begins with specified text, false otherwise

◆ StartsWith() [2/4]

bool UE_STRING_CLASS::StartsWith ( const ElementType InPrefix,
ESearchCase::Type  SearchCase = ESearchCase::IgnoreCase 
) const
inline

Test whether this string starts with given prefix.

Parameters
InPrefixThe prefix to search for at the start of the string.
SearchCaseIndicates whether the search is case sensitive or not (defaults to ESearchCase::IgnoreCase)
Returns
true if this string begins with specified text, false otherwise

◆ StartsWith() [3/4]

bool UE_STRING_CLASS::StartsWith ( const ElementType InPrefix,
int32  InPrefixLen,
ESearchCase::Type  SearchCase = ESearchCase::IgnoreCase 
) const

Test whether this string starts with given prefix.

Parameters
InPrefixThe prefix to search for at the start of the string.
SearchCaseIndicates whether the search is case sensitive or not (defaults to ESearchCase::IgnoreCase)
Returns
true if this string begins with specified text, false otherwise

◆ StartsWith() [4/4]

bool UE_STRING_CLASS::StartsWith ( const UE_STRING_CLASS InPrefix,
ESearchCase::Type  SearchCase = ESearchCase::IgnoreCase 
) const
inline

Test whether this string starts with given prefix.

Parameters
InPrefixThe prefix to search for at the start of the string.
SearchCaseIndicates whether the search is case sensitive or not (defaults to ESearchCase::IgnoreCase)
Returns
true if this string begins with specified text, false otherwise

◆ ToBlob()

bool UE_STRING_CLASS::ToBlob ( const UE_STRING_CLASS Source,
uint8 DestBuffer,
const uint32  DestSize 
)
static

Converts a string into a buffer

Parameters
DestBufferthe buffer to fill with the string data
DestSizethe size of the buffer in bytes (must be at least string len / 3)
Returns
true if the conversion happened, false otherwise

◆ ToBool()

bool UE_STRING_CLASS::ToBool ( ) const

Converts a string into a boolean value 1, "True", "Yes", FCoreTexts::True, FCoreTexts::Yes, and non-zero integers become true 0, "False", "No", FCoreTexts::False, FCoreTexts::No, and unparsable values become false

Returns
The boolean value

◆ ToHexBlob()

bool UE_STRING_CLASS::ToHexBlob ( const UE_STRING_CLASS Source,
uint8 DestBuffer,
const uint32  DestSize 
)
static

Converts a string into a buffer

Parameters
DestBufferthe buffer to fill with the string data
DestSizethe size of the buffer in bytes (must be at least string len / 2)
Returns
true if the conversion happened, false otherwise

◆ ToLower() [1/2]

UE_STRING_CLASS UE_STRING_CLASS::ToLower ( ) &&

Converts all characters in this rvalue string to lowercase and moves it into the returned string.

Returns
a new string with the characters of this converted to lowercase

◆ ToLower() [2/2]

UE_STRING_CLASS UE_STRING_CLASS::ToLower ( ) const &

Returns a new string with the characters of this converted to lowercase

◆ ToLowerInline()

void UE_STRING_CLASS::ToLowerInline ( )

Converts all characters in this string to lowercase

◆ ToUpper() [1/2]

UE_STRING_CLASS UE_STRING_CLASS::ToUpper ( ) &&

Converts all characters in this rvalue string to uppercase and moves it into the returned string.

Returns
a new string with the characters of this converted to uppercase

◆ ToUpper() [2/2]

UE_STRING_CLASS UE_STRING_CLASS::ToUpper ( ) const &

Returns a new string with the characters of this converted to uppercase

◆ ToUpperInline()

void UE_STRING_CLASS::ToUpperInline ( )

Converts all characters in this string to uppercase

◆ TrimChar() [1/2]

UE_STRING_CLASS UE_STRING_CLASS::TrimChar ( ElementType  CharacterToTrim,
bool bCharRemoved = nullptr 
) &&

Returns a copy of this string with wrapping CharacterToTrim removed (removes at max one instance in the beginning and end of the string).

◆ TrimChar() [2/2]

UE_STRING_CLASS UE_STRING_CLASS::TrimChar ( ElementType  CharacterToTrim,
bool bCharRemoved = nullptr 
) const &

Returns a copy of this string with wrapping CharacterToTrim removed (removes at max one instance in the beginning and end of the string).

See also
TrimCharInline for an inline variant

◆ TrimCharInline()

void UE_STRING_CLASS::TrimCharInline ( ElementType  CharacterToTrim,
bool bCharRemoved 
)

Trims a single character from the start and end of the string (removes at max one instance in the beginning and end of the string).

See also
TrimChar for a variant that returns a modified copy of the string

◆ TrimEnd() [1/2]

UE_STRING_CLASS UE_STRING_CLASS::TrimEnd ( ) &&

Removes whitespace characters from the end of this string.

Note
Unlike TrimTrailing() this function returns a copy, and does not mutate the string.

◆ TrimEnd() [2/2]

UE_STRING_CLASS UE_STRING_CLASS::TrimEnd ( ) const &

Removes whitespace characters from the end of this string.

Note
Unlike TrimTrailing() this function returns a copy, and does not mutate the string.

◆ TrimEndInline()

void UE_STRING_CLASS::TrimEndInline ( )

Removes whitespace characters from the end of this string. Modifies the string in-place.

◆ TrimQuotes() [1/2]

UE_STRING_CLASS UE_STRING_CLASS::TrimQuotes ( bool bQuotesRemoved = nullptr) &&

Returns this string with wrapping quotation marks removed.

◆ TrimQuotes() [2/2]

UE_STRING_CLASS UE_STRING_CLASS::TrimQuotes ( bool bQuotesRemoved = nullptr) const &

Returns a copy of this string with wrapping quotation marks removed.

◆ TrimQuotesInline()

void UE_STRING_CLASS::TrimQuotesInline ( bool bQuotesRemoved = nullptr)

Trims wrapping quotation marks from this string.

◆ TrimStart() [1/2]

UE_STRING_CLASS UE_STRING_CLASS::TrimStart ( ) &&

Removes whitespace characters from the start of this string.

Note
Unlike Trim() this function returns a copy, and does not mutate the string.

◆ TrimStart() [2/2]

UE_STRING_CLASS UE_STRING_CLASS::TrimStart ( ) const &

Removes whitespace characters from the start of this string.

Note
Unlike Trim() this function returns a copy, and does not mutate the string.

◆ TrimStartAndEnd() [1/2]

UE_STRING_CLASS UE_STRING_CLASS::TrimStartAndEnd ( ) &&

Removes whitespace characters from the start and end of this string.

Note
Unlike Trim() this function returns a copy, and does not mutate the string.

◆ TrimStartAndEnd() [2/2]

UE_STRING_CLASS UE_STRING_CLASS::TrimStartAndEnd ( ) const &

Removes whitespace characters from the start and end of this string.

Note
Unlike Trim() this function returns a copy, and does not mutate the string.

◆ TrimStartAndEndInline()

void UE_STRING_CLASS::TrimStartAndEndInline ( )

Removes whitespace characters from the start and end of this string. Modifies the string in-place.

◆ TrimStartInline()

void UE_STRING_CLASS::TrimStartInline ( )

Removes whitespace characters from the start of this string. Modifies the string in-place.

◆ TrimToNullTerminator()

void UE_STRING_CLASS::TrimToNullTerminator ( )

Trims the inner array after the null terminator.

◆ UE_STRING_DEPRECATED() [1/8]

UE_STRING_CLASS::UE_STRING_DEPRECATED ( 5.  4,
"This constructor has been deprecated - please use " PREPROCESSOR_TO_STRING(UE_STRING_CLASS) "::ConstructFromPtrSize(Ptr, Size) instead."   
)

Construct from null-terminated C substring or nullptr

◆ UE_STRING_DEPRECATED() [2/8]

UE_STRING_CLASS::UE_STRING_DEPRECATED ( 5.  4,
"This constructor has been deprecated - please use " PREPROCESSOR_TO_STRING(UE_STRING_CLASS) "::ConstructFromPtrSize(Ptr, Size) instead."   
)

◆ UE_STRING_DEPRECATED() [3/8]

UE_STRING_CLASS::UE_STRING_DEPRECATED ( 5.  4,
"This constructor has been deprecated - please use " PREPROCESSOR_TO_STRING(UE_STRING_CLASS) "::ConstructFromPtrSize(Ptr, Size) instead."   
)

◆ UE_STRING_DEPRECATED() [4/8]

UE_STRING_CLASS::UE_STRING_DEPRECATED ( 5.  4,
"This constructor has been deprecated - please use " PREPROCESSOR_TO_STRING(UE_STRING_CLASS) "::ConstructFromPtrSize(Ptr, Size) instead."   
)

◆ UE_STRING_DEPRECATED() [5/8]

UE_STRING_CLASS::UE_STRING_DEPRECATED ( 5.  4,
"This constructor has been deprecated - please use " PREPROCESSOR_TO_STRING(UE_STRING_CLASS) "::ConstructWithSlack(Ptr, Size) instead."   
) const

Construct from null-terminated C string or nullptr with extra slack on top of original string length

◆ UE_STRING_DEPRECATED() [6/8]

UE_STRING_CLASS::UE_STRING_DEPRECATED ( 5.  4,
"This constructor has been deprecated - please use " PREPROCESSOR_TO_STRING(UE_STRING_CLASS) "::ConstructWithSlack(Ptr, Size) instead."   
) const

◆ UE_STRING_DEPRECATED() [7/8]

UE_STRING_CLASS::UE_STRING_DEPRECATED ( 5.  4,
"This constructor has been deprecated - please use " PREPROCESSOR_TO_STRING(UE_STRING_CLASS) "::ConstructWithSlack(Ptr, Size) instead."   
) const

◆ UE_STRING_DEPRECATED() [8/8]

UE_STRING_CLASS::UE_STRING_DEPRECATED ( 5.  4,
"This constructor has been deprecated - please use " PREPROCESSOR_TO_STRING(UE_STRING_CLASS) "::ConstructWithSlack(Ptr, Size) instead."   
) const

◆ UEOpEquals() [1/3]

template<typename CharType >
UE_FORCEINLINE_HINT bool UE_STRING_CLASS::UEOpEquals ( const CharType *  Rhs) const
inline

Lexicographically test whether the left string is == the right string

Parameters
LhsString to compare against.
RhsString to compare against.
Returns
true if the left string is lexicographically == the right string, otherwise false
Note
case insensitive

◆ UEOpEquals() [2/3]

UE_FORCEINLINE_HINT bool UE_STRING_CLASS::UEOpEquals ( const UE_STRING_CLASS Rhs) const
inline

Lexicographically test whether the left string is == the right string

Parameters
LhsString to compare against.
RhsString to compare against.
Returns
true if the left string is lexicographically == the right string, otherwise false
Note
case insensitive

◆ UEOpEquals() [3/3]

bool UE_STRING_CLASS::UEOpEquals ( FIntrusiveUnsetOptionalState  Tag) const
inline

◆ UEOpGreaterThan()

template<typename CharType >
UE_FORCEINLINE_HINT bool UE_STRING_CLASS::UEOpGreaterThan ( const CharType *  Rhs) const
inline

Lexicographically test whether the left string is > the right string

Parameters
LhsString to compare against.
RhsString to compare against.
Returns
true if the left string is lexicographically > the right string, otherwise false
Note
case insensitive

◆ UEOpLessThan() [1/2]

template<typename CharType >
UE_FORCEINLINE_HINT bool UE_STRING_CLASS::UEOpLessThan ( const CharType *  Rhs) const
inline

Lexicographically test whether the left string is < the right string

Parameters
LhsString to compare against.
RhsString to compare against.
Returns
true if the left string is lexicographically < the right string, otherwise false
Note
case insensitive

◆ UEOpLessThan() [2/2]

UE_FORCEINLINE_HINT bool UE_STRING_CLASS::UEOpLessThan ( const UE_STRING_CLASS Rhs) const
inline

Lexicographically test whether the left string is < the right string

Parameters
LhsString to compare against.
RhsString to compare against.
Returns
true if the left string is lexicographically < the right string, otherwise false
Note
case insensitive

Friends And Related Symbol Documentation

◆ GetTypeHash

UE_FORCEINLINE_HINT uint32 GetTypeHash ( const UE_STRING_CLASS S)
friend

Case insensitive string hash function.

◆ operator+ [1/14]

template<typename CharRangeType , typename CharRangeElementType = TElementType_T<CharRangeType> UE_REQUIRES( TIsContiguousContainer<CharRangeType>::Value && !std::is_array_v<std::remove_reference_t<CharRangeType>> && std::is_same_v<ElementType, CharRangeElementType> && !std::is_base_of_v<UE_STRING_CLASS, std::decay_t<CharRangeType>> )>
UE_FORCEINLINE_HINT friend UE_STRING_CLASS operator+ ( CharRangeType &&  Lhs,
const UE_STRING_CLASS Rhs 
)
friend

◆ operator+ [2/14]

template<typename CharRangeType , typename CharRangeElementType = TElementType_T<CharRangeType> UE_REQUIRES( TIsContiguousContainer<CharRangeType>::Value && !std::is_array_v<std::remove_reference_t<CharRangeType>>&& std::is_same_v<ElementType, CharRangeElementType> && !std::is_base_of_v<UE_STRING_CLASS, std::decay_t<CharRangeType>> )>
UE_FORCEINLINE_HINT friend UE_STRING_CLASS operator+ ( CharRangeType &&  Lhs,
UE_STRING_CLASS &&  Rhs 
)
friend

◆ operator+ [3/14]

UE_FORCEINLINE_HINT friend UE_STRING_CLASS operator+ ( const ElementType Lhs,
const UE_STRING_CLASS Rhs 
)
friend

◆ operator+ [4/14]

UE_FORCEINLINE_HINT friend UE_STRING_CLASS operator+ ( const ElementType Lhs,
UE_STRING_CLASS &&  Rhs 
)
friend

◆ operator+ [5/14]

template<typename CharRangeType , typename CharRangeElementType = TElementType_T<CharRangeType> UE_REQUIRES( TIsContiguousContainer<CharRangeType>::Value && !std::is_array_v<std::remove_reference_t<CharRangeType>>&& std::is_same_v<ElementType, CharRangeElementType> && !std::is_base_of_v<UE_STRING_CLASS, std::decay_t<CharRangeType>> )>
UE_FORCEINLINE_HINT friend UE_STRING_CLASS operator+ ( const UE_STRING_CLASS Lhs,
CharRangeType &&  Rhs 
)
friend

◆ operator+ [6/14]

template<typename CharType >
UE_STRING_CLASS operator+ ( const UE_STRING_CLASS Lhs,
CharType  Rhs 
)
friend

Concatenates a string with a character.

Parameters
LhsThe string on the left-hand-side of the expression.
RhsThe char on the right-hand-side of the expression.
Returns
The concatenated string.

◆ operator+ [7/14]

UE_FORCEINLINE_HINT friend UE_STRING_CLASS operator+ ( const UE_STRING_CLASS Lhs,
const ElementType Rhs 
)
friend

◆ operator+ [8/14]

UE_FORCEINLINE_HINT friend UE_STRING_CLASS operator+ ( const UE_STRING_CLASS Lhs,
const UE_STRING_CLASS Rhs 
)
friend

◆ operator+ [9/14]

UE_FORCEINLINE_HINT friend UE_STRING_CLASS operator+ ( const UE_STRING_CLASS Lhs,
UE_STRING_CLASS &&  Rhs 
)
friend

◆ operator+ [10/14]

template<typename CharRangeType , typename CharRangeElementType = TElementType_T<CharRangeType> UE_REQUIRES( TIsContiguousContainer<CharRangeType>::Value && !std::is_array_v<std::remove_reference_t<CharRangeType>>&& std::is_same_v<ElementType, CharRangeElementType> && !std::is_base_of_v<UE_STRING_CLASS, std::decay_t<CharRangeType>> )>
UE_FORCEINLINE_HINT friend UE_STRING_CLASS operator+ ( UE_STRING_CLASS &&  Lhs,
CharRangeType &&  Rhs 
)
friend

◆ operator+ [11/14]

template<typename CharType >
UE_STRING_CLASS operator+ ( UE_STRING_CLASS &&  Lhs,
CharType  Rhs 
)
friend

Concatenates a string with a character.

Parameters
LhsThe string on the left-hand-side of the expression.
RhsThe char on the right-hand-side of the expression.
Returns
The concatenated string.

◆ operator+ [12/14]

UE_FORCEINLINE_HINT friend UE_STRING_CLASS operator+ ( UE_STRING_CLASS &&  Lhs,
const ElementType Rhs 
)
friend

◆ operator+ [13/14]

UE_FORCEINLINE_HINT friend UE_STRING_CLASS operator+ ( UE_STRING_CLASS &&  Lhs,
const UE_STRING_CLASS Rhs 
)
friend

◆ operator+ [14/14]

UE_FORCEINLINE_HINT friend UE_STRING_CLASS operator+ ( UE_STRING_CLASS &&  Lhs,
UE_STRING_CLASS &&  Rhs 
)
friend

◆ operator/ [1/5]

UE_STRING_CLASS operator/ ( const ElementType Lhs,
const UE_STRING_CLASS Rhs 
)
friend

Concatenate this path with given path ensuring the / character is used between them

Parameters
LhsPath to concatenate onto.
RhsPath to concatenate.
Returns
new string of the path

◆ operator/ [2/5]

UE_STRING_CLASS operator/ ( const UE_STRING_CLASS Lhs,
const ElementType Rhs 
)
friend

Concatenate this path with given path ensuring the / character is used between them

Parameters
LhsPath to concatenate onto.
RhsPath to concatenate.
Returns
The new concatenated path

◆ operator/ [3/5]

UE_STRING_CLASS operator/ ( const UE_STRING_CLASS Lhs,
const UE_STRING_CLASS Rhs 
)
friend

Concatenate this path with given path ensuring the / character is used between them

Parameters
LhsPath to concatenate onto.
RhsPath to concatenate.
Returns
The new concatenated path

◆ operator/ [4/5]

UE_STRING_CLASS operator/ ( UE_STRING_CLASS &&  Lhs,
const ElementType Rhs 
)
friend

Concatenate this path with given path ensuring the / character is used between them

Parameters
LhsPath to concatenate onto.
RhsPath to concatenate.
Returns
The new concatenated path

◆ operator/ [5/5]

UE_STRING_CLASS operator/ ( UE_STRING_CLASS &&  Lhs,
const UE_STRING_CLASS Rhs 
)
friend

Concatenate this path with given path ensuring the / character is used between them

Parameters
LhsPath to concatenate onto.
RhsPath to concatenate.
Returns
The new concatenated path

◆ operator<<

CORE_API FArchive & operator<< ( FArchive Ar,
UE_STRING_CLASS Str 
)
friend

Serializes the string.

Parameters
ArReference to the serialization archive.
StrReference to the string being serialized.
Returns
Reference to the Archive after serialization.

Member Data Documentation

◆ bHasIntrusiveUnsetOptionalState

constexpr bool UE_STRING_CLASS::bHasIntrusiveUnsetOptionalState = true
staticconstexpr

◆ ExtraSlack

int32 UE_STRING_CLASS::ExtraSlack

◆ Str [1/4]

const ANSICHAR* UE_STRING_CLASS::Str

◆ Str [2/4]

const WIDECHAR* UE_STRING_CLASS::Str

◆ Str [3/4]

const UTF8CHAR* UE_STRING_CLASS::Str

◆ Str [4/4]

const UCS2CHAR* UE_STRING_CLASS::Str

The documentation for this class was generated from the following files: