Ark Server API (ASA) - Wiki
Loading...
Searching...
No Matches
FString Class Reference

#include <UnrealString.h>

+ Inheritance diagram for FString:
+ Collaboration diagram for FString:

Classes

struct  TIsRangeOfCharType
 
struct  TIsRangeOfTCHAR
 

Public Types

using AllocatorType = TSizedDefaultAllocator<32>
 
using ElementType = TCHAR
 
typedef DataType::TIterator TIterator
 
typedef DataType::TConstIterator TConstIterator
 

Public Member Functions

std::string ToString () const
 
std::string ToStringUTF8 () const
 
FORCEINLINE FString (const std::wstring &str)
 
FORCEINLINE FString (const std::string &str)
 
 FString ()=default
 
 FString (FString &&)=default
 
 FString (const FString &)=default
 
FStringoperator= (FString &&)=default
 
FStringoperator= (const FString &)=default
 
FORCEINLINE FString (const FString &Other, int32 ExtraSlack)
 
FORCEINLINE FString (FString &&Other, int32 ExtraSlack)
 
ARK_API FString (const ANSICHAR *Str)
 
ARK_API FString (const WIDECHAR *Str)
 
ARK_API FString (const UTF8CHAR *Str)
 
ARK_API FString (const UCS2CHAR *Str)
 
ARK_API FString (int32 Len, const ANSICHAR *Str)
 
ARK_API FString (int32 Len, const WIDECHAR *Str)
 
ARK_API FString (int32 Len, const UTF8CHAR *Str)
 
ARK_API FString (int32 Len, const UCS2CHAR *Str)
 
ARK_API FString (const ANSICHAR *Str, int32 ExtraSlack)
 
ARK_API FString (const WIDECHAR *Str, int32 ExtraSlack)
 
ARK_API FString (const UTF8CHAR *Str, int32 ExtraSlack)
 
ARK_API FString (const UCS2CHAR *Str, int32 ExtraSlack)
 
template<typename CharRangeType , typename TEnableIf< TIsCharRangeNotCArrayNotFString< CharRangeType >::Value >::Type * = nullptr>
FORCEINLINE FString (CharRangeType &&Str)
 
template<typename CharRangeType , typename TEnableIf< TIsCharRangeNotCArrayNotFString< CharRangeType >::Value >::Type * = nullptr>
 FString (CharRangeType &&Str, int32 ExtraSlack)
 
ARK_API FStringoperator= (const TCHAR *Str)
 
template<typename CharRangeType , typename TEnableIf< TIsTCharRangeNotCArray< CharRangeType >::Value >::Type * = nullptr>
FORCEINLINE FStringoperator= (CharRangeType &&Range)
 
FORCEINLINE TCHAR & operator[] (int32 Index) UE_LIFETIMEBOUND
 
FORCEINLINE const TCHAR & operator[] (int32 Index) const UE_LIFETIMEBOUND
 
FORCEINLINE TIterator CreateIterator ()
 
FORCEINLINE TConstIterator CreateConstIterator () const
 
FORCEINLINE DataType::RangedForIteratorType begin ()
 
FORCEINLINE DataType::RangedForConstIteratorType begin () const
 
FORCEINLINE DataType::RangedForIteratorType end ()
 
FORCEINLINE DataType::RangedForConstIteratorType end () const
 
FORCEINLINE SIZE_T GetAllocatedSize () const
 
FORCEINLINE void CheckInvariants () const
 
ARK_API void Empty ()
 
ARK_API void Empty (int32 Slack)
 
UE_NODISCARD FORCEINLINE bool IsEmpty () const
 
void Reset (int32 NewReservedSize=0)
 
void Shrink ()
 
UE_NODISCARD FORCEINLINE bool IsValidIndex (int32 Index) const
 
UE_NODISCARD FORCEINLINE const TCHAR * operator* () const UE_LIFETIMEBOUND
 
UE_NODISCARD FORCEINLINE DataTypeGetCharArray () UE_LIFETIMEBOUND
 
UE_NODISCARD FORCEINLINE const DataTypeGetCharArray () const UE_LIFETIMEBOUND
 
ARK_API void AppendChars (const ANSICHAR *Str, int32 Count)
 
ARK_API void AppendChars (const WIDECHAR *Str, int32 Count)
 
ARK_API void AppendChars (const UCS2CHAR *Str, int32 Count)
 
ARK_API void AppendChars (const UTF8CHAR *Str, int32 Count)
 
template<class CharType >
FORCEINLINE FStringAppend (const CharType *Str, int32 Count)
 
template<class CharType >
FORCEINLINE FStringAppend (CharType *Str)
 
template<typename CharRangeType , typename TEnableIf< TIsCharRangeNotCArray< CharRangeType >::Value >::Type * = nullptr>
FORCEINLINE FStringAppend (CharRangeType &&Str)
 
FStringAppendChar (TCHAR InChar)
 
template<typename StrType >
FORCEINLINE auto operator+= (StrType &&Str) -> decltype(Append(Forward< StrType >(Str)))
 
template<typename AppendedCharType , std::enable_if_t< TIsCharType< AppendedCharType >::Value > * = nullptr>
FORCEINLINE FStringoperator+= (AppendedCharType Char)
 
void InsertAt (int32 Index, TCHAR Character)
 
void InsertAt (int32 Index, const FString &Characters)
 
ARK_API void RemoveAt (int32 Index, int32 Count=1, bool bAllowShrinking=true)
 
template<typename TCharRangeType , std::enable_if_t< TIsCharRangeNotCArrayNotFString< TCharRangeType >::Value > * = nullptr>
bool RemoveFromStart (TCharRangeType &&InPrefix, ESearchCase::Type SearchCase=ESearchCase::IgnoreCase)
 
ARK_API bool RemoveFromStart (const TCHAR *InPrefix, ESearchCase::Type SearchCase=ESearchCase::IgnoreCase)
 
ARK_API bool RemoveFromStart (const FString &InPrefix, ESearchCase::Type SearchCase=ESearchCase::IgnoreCase)
 
ARK_API bool RemoveFromStart (const TCHAR *InPrefix, int32 InPrefixLen, ESearchCase::Type SearchCase=ESearchCase::IgnoreCase)
 
template<typename TCharRangeType , std::enable_if_t< TIsCharRangeNotCArrayNotFString< TCharRangeType >::Value > * = nullptr>
bool RemoveFromEnd (TCharRangeType &&InSuffix, ESearchCase::Type SearchCase=ESearchCase::IgnoreCase)
 
ARK_API bool RemoveFromEnd (const TCHAR *InSuffix, ESearchCase::Type SearchCase=ESearchCase::IgnoreCase)
 
ARK_API bool RemoveFromEnd (const FString &InSuffix, ESearchCase::Type SearchCase=ESearchCase::IgnoreCase)
 
ARK_API bool RemoveFromEnd (const TCHAR *InSuffix, int32 InSuffixLen, ESearchCase::Type SearchCase=ESearchCase::IgnoreCase)
 
void PathAppend (const TCHAR *Str, int32 StrLength)
 
FORCEINLINE FStringoperator/= (const TCHAR *Str)
 
template<typename CharRangeType , typename TEnableIf< TIsTCharRangeNotCArray< CharRangeType >::Value >::Type * = nullptr>
FORCEINLINE FStringoperator/= (CharRangeType &&Str)
 
template<typename CharType , typename TEnableIf< TIsCharType< CharType >::Value >::Type * = nullptr>
FORCEINLINE FStringoperator/= (const CharType *Str)
 
UE_NODISCARD FORCEINLINE bool operator== (const FString &Rhs) const
 
template<typename CharType >
UE_NODISCARD FORCEINLINE bool operator== (const CharType *Rhs) const
 
UE_NODISCARD FORCEINLINE bool operator!= (const FString &Rhs) const
 
template<typename CharType >
UE_NODISCARD FORCEINLINE bool operator!= (const CharType *Rhs) const
 
UE_NODISCARD FORCEINLINE int32 Len () const
 
UE_NODISCARD FORCEINLINE FString Left (int32 Count) const &
 
UE_NODISCARD FORCEINLINE FString Left (int32 Count) &&
 
FORCEINLINE void LeftInline (int32 Count, bool bAllowShrinking=true)
 
UE_NODISCARD FORCEINLINE FString LeftChop (int32 Count) const &
 
UE_NODISCARD FORCEINLINE FString LeftChop (int32 Count) &&
 
FORCEINLINE void LeftChopInline (int32 Count, bool bAllowShrinking=true)
 
UE_NODISCARD FORCEINLINE FString Right (int32 Count) const &
 
UE_NODISCARD FORCEINLINE FString Right (int32 Count) &&
 
FORCEINLINE void RightInline (int32 Count, bool bAllowShrinking=true)
 
UE_NODISCARD FString RightChop (int32 Count) const &
 
UE_NODISCARD FORCEINLINE FString RightChop (int32 Count) &&
 
FORCEINLINE void RightChopInline (int32 Count, bool bAllowShrinking=true)
 
UE_NODISCARD FString Mid (int32 Start, int32 Count) const &
 
UE_NODISCARD FString Mid (int32 Start, int32 Count) &&
 
UE_NODISCARD FORCEINLINE FString Mid (int32 Start) const &
 
UE_NODISCARD FORCEINLINE FString Mid (int32 Start) &&
 
FORCEINLINE void MidInline (int32 Start, int32 Count=MAX_int32, bool bAllowShrinking=true)
 
template<typename TCharRangeType , std::enable_if_t< TIsCharRangeNotCArrayNotFString< TCharRangeType >::Value > * = nullptr>
UE_NODISCARD int32 Find (TCharRangeType &&SubStr, ESearchCase::Type SearchCase=ESearchCase::IgnoreCase, ESearchDir::Type SearchDir=ESearchDir::FromStart, int32 StartPosition=INDEX_NONE) const
 
UE_NODISCARD int32 Find (const TCHAR *SubStr, ESearchCase::Type SearchCase=ESearchCase::IgnoreCase, ESearchDir::Type SearchDir=ESearchDir::FromStart, int32 StartPosition=INDEX_NONE) const
 
UE_NODISCARD int32 Find (const FString &SubStr, ESearchCase::Type SearchCase=ESearchCase::IgnoreCase, ESearchDir::Type SearchDir=ESearchDir::FromStart, int32 StartPosition=INDEX_NONE) const
 
UE_NODISCARD int32 Find (const TCHAR *SubStr, int32 SubStrLen, ESearchCase::Type SearchCase=ESearchCase::IgnoreCase, ESearchDir::Type SearchDir=ESearchDir::FromStart, int32 StartPosition=INDEX_NONE) const
 
template<typename TCharRangeType , std::enable_if_t< TIsCharRangeNotCArrayNotFString< TCharRangeType >::Value > * = nullptr>
UE_NODISCARD FORCEINLINE bool Contains (TCharRangeType &&SubStr, ESearchCase::Type SearchCase=ESearchCase::IgnoreCase, ESearchDir::Type SearchDir=ESearchDir::FromStart) const
 
UE_NODISCARD FORCEINLINE bool Contains (const TCHAR *SubStr, ESearchCase::Type SearchCase=ESearchCase::IgnoreCase, ESearchDir::Type SearchDir=ESearchDir::FromStart) const
 
UE_NODISCARD FORCEINLINE bool Contains (const FString &SubStr, ESearchCase::Type SearchCase=ESearchCase::IgnoreCase, ESearchDir::Type SearchDir=ESearchDir::FromStart) const
 
UE_NODISCARD FORCEINLINE bool Contains (const TCHAR *SubStr, int32 SubStrLen, ESearchCase::Type SearchCase=ESearchCase::IgnoreCase, ESearchDir::Type SearchDir=ESearchDir::FromStart) const
 
FORCEINLINE bool FindChar (TCHAR InChar, int32 &Index) const
 
FORCEINLINE bool FindLastChar (TCHAR InChar, int32 &Index) const
 
template<typename Predicate >
FORCEINLINE int32 FindLastCharByPredicate (Predicate Pred, int32 Count) const
 
template<typename Predicate >
FORCEINLINE int32 FindLastCharByPredicate (Predicate Pred) const
 
UE_NODISCARD FORCEINLINE bool Equals (const FString &Other, ESearchCase::Type SearchCase=ESearchCase::CaseSensitive) const
 
UE_NODISCARD FORCEINLINE int32 Compare (const FString &Other, ESearchCase::Type SearchCase=ESearchCase::CaseSensitive) const
 
bool Split (const FString &InS, FString *LeftS, FString *RightS, ESearchCase::Type SearchCase, ESearchDir::Type SearchDir=ESearchDir::FromStart) const
 
bool Split (const FString &InS, FString *LeftS, FString *RightS) const
 
UE_NODISCARD FString ToUpper () const &
 
UE_NODISCARD FString ToUpper () &&
 
void ToUpperInline ()
 
UE_NODISCARD FString ToLower () const &
 
UE_NODISCARD FString ToLower () &&
 
void ToLowerInline ()
 
UE_NODISCARD FString LeftPad (int32 ChCount) const
 
UE_NODISCARD FString RightPad (int32 ChCount) const
 
UE_NODISCARD bool IsNumeric () const
 
void RemoveSpacesInline ()
 
template<typename FmtType , typename... Types>
FStringAppendf (const FmtType &Fmt, Types... Args)
 
bool StartsWith (const TCHAR *InPrefix, int32 InPrefixLen, ESearchCase::Type SearchCase) const
 
template<typename TCharRangeType , std::enable_if_t< TIsCharRangeNotCArrayNotFString< TCharRangeType >::Value > * = nullptr>
UE_NODISCARD bool StartsWith (TCharRangeType &&InPrefix, ESearchCase::Type SearchCase=ESearchCase::IgnoreCase) const
 
UE_NODISCARD bool StartsWith (const TCHAR *InPrefix, ESearchCase::Type SearchCase=ESearchCase::IgnoreCase) const
 
UE_NODISCARD bool StartsWith (const FString &InPrefix, ESearchCase::Type SearchCase=ESearchCase::IgnoreCase) const
 
bool EndsWith (const TCHAR *InSuffix, int32 InSuffixLen, ESearchCase::Type SearchCase=ESearchCase::IgnoreCase) const
 
template<typename TCharRangeType , std::enable_if_t< TIsCharRangeNotCArrayNotFString< TCharRangeType >::Value > * = nullptr>
UE_NODISCARD bool EndsWith (TCharRangeType &&InSuffix, ESearchCase::Type SearchCase=ESearchCase::IgnoreCase) const
 
UE_NODISCARD bool EndsWith (const TCHAR *InSuffix, ESearchCase::Type SearchCase=ESearchCase::IgnoreCase) const
 
UE_NODISCARD bool EndsWith (const FString &InSuffix, ESearchCase::Type SearchCase=ESearchCase::IgnoreCase) const
 
template<typename TCharRangeType , std::enable_if_t< TIsCharRangeNotCArrayNotFString< TCharRangeType >::Value > * = nullptr>
UE_NODISCARD bool MatchesWildcard (TCharRangeType &&Wildcard, ESearchCase::Type SearchCase=ESearchCase::IgnoreCase) const
 
UE_NODISCARD bool MatchesWildcard (const TCHAR *Wildcard, ESearchCase::Type SearchCase=ESearchCase::IgnoreCase) const
 
UE_NODISCARD bool MatchesWildcard (const FString &Wildcard, ESearchCase::Type SearchCase=ESearchCase::IgnoreCase) const
 
UE_NODISCARD bool MatchesWildcard (const TCHAR *Wildcard, int32 WildcardLen, ESearchCase::Type SearchCase=ESearchCase::IgnoreCase) const
 
void TrimStartAndEndInline ()
 
UE_NODISCARD FString TrimStartAndEnd () const &
 
UE_NODISCARD FString TrimStartAndEnd () &&
 
void TrimStartInline ()
 
UE_NODISCARD FString TrimStart () const &
 
UE_NODISCARD FString TrimStart () &&
 
void TrimEndInline ()
 
UE_NODISCARD FString TrimEnd () const &
 
UE_NODISCARD FString TrimEnd () &&
 
void TrimToNullTerminator ()
 
void TrimQuotesInline (bool *bQuotesRemoved=nullptr)
 
void TrimCharInline (const TCHAR CharacterToTrim, bool *bCharRemoved)
 
UE_NODISCARD FString TrimQuotes (bool *bQuotesRemoved=nullptr) const &
 
UE_NODISCARD FString TrimQuotes (bool *bQuotesRemoved=nullptr) &&
 
UE_NODISCARD FString TrimChar (const TCHAR CharacterToTrim, bool *bCharRemoved=nullptr) const &
 
UE_NODISCARD FString TrimChar (const TCHAR CharacterToTrim, bool *bCharRemoved=nullptr) &&
 
ARK_API int32 ParseIntoArray (TArray< FString > &OutArray, const TCHAR *pchDelim, bool InCullEmpty=true) const
 
ARK_API int32 ParseIntoArrayWS (TArray< FString > &OutArray, const TCHAR *pchExtraDelim=nullptr, bool InCullEmpty=true) const
 
ARK_API int32 ParseIntoArrayLines (TArray< FString > &OutArray, bool InCullEmpty=true) const
 
ARK_API int32 ParseIntoArray (TArray< FString > &OutArray, const TCHAR *const *DelimArray, int32 NumDelims, bool InCullEmpty=true) const
 
UE_NODISCARD FString Reverse () const &
 
UE_NODISCARD FString Reverse () &&
 
void ReverseString ()
 
UE_NODISCARD FString Replace (const TCHAR *From, const TCHAR *To, ESearchCase::Type SearchCase=ESearchCase::IgnoreCase) const &
 
UE_NODISCARD FString Replace (const TCHAR *From, const TCHAR *To, ESearchCase::Type SearchCase=ESearchCase::IgnoreCase) &&
 
int32 ReplaceInline (const TCHAR *SearchText, const TCHAR *ReplacementText, ESearchCase::Type SearchCase=ESearchCase::IgnoreCase)
 
void ReplaceCharInline (const TCHAR SearchChar, const TCHAR ReplacementChar, ESearchCase::Type SearchCase=ESearchCase::IgnoreCase)
 
UE_NODISCARD FString ReplaceQuotesWithEscapedQuotes () const &
 
UE_NODISCARD FString ReplaceQuotesWithEscapedQuotes () &&
 
void ReplaceCharWithEscapedCharInline (const TArray< TCHAR > *Chars=nullptr)
 
UE_NODISCARD FString ReplaceCharWithEscapedChar (const TArray< TCHAR > *Chars=nullptr) const &
 
UE_NODISCARD FString ReplaceCharWithEscapedChar (const TArray< TCHAR > *Chars=nullptr) &&
 
void ReplaceEscapedCharWithCharInline (const TArray< TCHAR > *Chars=nullptr)
 
UE_NODISCARD FString ReplaceEscapedCharWithChar (const TArray< TCHAR > *Chars=nullptr) const &
 
UE_NODISCARD FString ReplaceEscapedCharWithChar (const TArray< TCHAR > *Chars=nullptr) &&
 
void ConvertTabsToSpacesInline (const int32 InSpacesPerTab)
 
UE_NODISCARD FString ConvertTabsToSpaces (const int32 InSpacesPerTab) const &
 
UE_NODISCARD FString ConvertTabsToSpaces (const int32 InSpacesPerTab) &&
 
void Reserve (int32 CharacterCount)
 
void SerializeAsANSICharArray (FArchive &Ar, int32 MinCharacters=0) const
 
void AppendInt (int32 InNum)
 
UE_NODISCARD bool ToBool () const
 
FORCEINLINE void CountBytes (FArchive &Ar) const
 

Static Public Member Functions

static FString FromString (const std::string input)
 
static FString FromStringUTF8 (const std::string input)
 
template<typename T , typename... Args>
static FString Format (const T *format, Args &&... args)
 
template<typename FmtType , typename... Types>
static UE_NODISCARD FString Printf (const FmtType &Fmt, Types... Args)
 
static UE_NODISCARD FString Format (const TCHAR *InFormatString, const FStringFormatNamedArguments &InNamedArguments)
 
static UE_NODISCARD FString Format (const TCHAR *InFormatString, const FStringFormatOrderedArguments &InOrderedArguments)
 
static UE_NODISCARD FString Chr (TCHAR Ch)
 
static UE_NODISCARD FString ChrN (int32 NumCharacters, TCHAR Char)
 
static int32 CullArray (TArray< FString > *InArray)
 
static UE_NODISCARD FString FormatAsNumber (int32 InNumber)
 
static UE_NODISCARD FORCEINLINE FString FromInt (int32 Num)
 
static UE_NODISCARD FString FromBlob (const uint8 *SrcBuffer, const uint32 SrcSize)
 
static bool ToBlob (const FString &Source, uint8 *DestBuffer, const uint32 DestSize)
 
static UE_NODISCARD FString FromHexBlob (const uint8 *SrcBuffer, const uint32 SrcSize)
 
static bool ToHexBlob (const FString &Source, uint8 *DestBuffer, const uint32 DestSize)
 
static UE_NODISCARD FString SanitizeFloat (double InFloat, const int32 InMinFractionalDigits=1)
 
template<typename RangeType >
static UE_NODISCARD FString Join (const RangeType &Range, const TCHAR *Separator)
 
template<typename RangeType , typename ProjectionType >
static UE_NODISCARD FString JoinBy (const RangeType &Range, const TCHAR *Separator, ProjectionType Proj)
 

Private Types

typedef TArray< TCHAR, AllocatorTypeDataType
 
template<typename RangeType >
using TRangeElementType = typename TRemoveCV<typename TRemovePointer<decltype(GetData(DeclVal<RangeType>()))>::Type>::Type
 
template<typename CharRangeType >
using TIsCharRangeNotCArray
 
template<typename CharRangeType >
using TIsCharRangeNotCArrayNotFString
 
template<typename CharRangeType >
using TIsTCharRangeNotCArray
 
template<typename CharRangeType >
using TIsTCharRangeNotCArrayNotFString
 

Private Member Functions

ARK_API void AssignRange (const TCHAR *Str, int32 Len)
 
void ReplaceCharInlineCaseSensitive (const TCHAR SearchChar, const TCHAR ReplacementChar)
 
void ReplaceCharInlineIgnoreCase (const TCHAR SearchChar, const TCHAR ReplacementChar)
 

Static Private Member Functions

UE_NODISCARD static ARK_API FString ConcatFF (const FString &Lhs, const FString &Rhs)
 
UE_NODISCARD static ARK_API FString ConcatFF (FString &&Lhs, const FString &Rhs)
 
UE_NODISCARD static ARK_API FString ConcatFF (const FString &Lhs, FString &&Rhs)
 
UE_NODISCARD static ARK_API FString ConcatFF (FString &&Lhs, FString &&Rhs)
 
UE_NODISCARD static ARK_API FString ConcatFC (const FString &Lhs, const TCHAR *Rhs)
 
UE_NODISCARD static ARK_API FString ConcatFC (FString &&Lhs, const TCHAR *Rhs)
 
UE_NODISCARD static ARK_API FString ConcatCF (const TCHAR *Lhs, const FString &Rhs)
 
UE_NODISCARD static ARK_API FString ConcatCF (const TCHAR *Lhs, FString &&Rhs)
 
UE_NODISCARD static ARK_API FString ConcatFR (const FString &Lhs, const TCHAR *Rhs, int32 RhsLen)
 
UE_NODISCARD static ARK_API FString ConcatFR (FString &&Lhs, const TCHAR *Rhs, int32 RhsLen)
 
UE_NODISCARD static ARK_API FString ConcatRF (const TCHAR *Lhs, int32 LhsLen, const FString &Rhs)
 
UE_NODISCARD static ARK_API FString ConcatRF (const TCHAR *Lhs, int32 LhsLen, FString &&Rhs)
 
static FString VARARGS PrintfImpl (const TCHAR *Fmt,...)
 
static void VARARGS AppendfImpl (FString &AppendToMe, const TCHAR *Fmt,...)
 

Private Attributes

DataType Data
 

Friends

template<typename CharType >
UE_NODISCARD FORCEINLINE friend TEnableIf< TIsCharType< CharType >::Value, FString >::Type operator+ (const FString &Lhs, CharType Rhs)
 
template<typename CharType >
UE_NODISCARD FORCEINLINE friend TEnableIf< TIsCharType< CharType >::Value, FString >::Type operator+ (FString &&Lhs, CharType Rhs)
 
UE_NODISCARD FORCEINLINE friend FString operator+ (const FString &Lhs, const FString &Rhs)
 
UE_NODISCARD FORCEINLINE friend FString operator+ (FString &&Lhs, const FString &Rhs)
 
UE_NODISCARD FORCEINLINE friend FString operator+ (const FString &Lhs, FString &&Rhs)
 
UE_NODISCARD FORCEINLINE friend FString operator+ (FString &&Lhs, FString &&Rhs)
 
UE_NODISCARD FORCEINLINE friend FString operator+ (const TCHAR *Lhs, const FString &Rhs)
 
UE_NODISCARD FORCEINLINE friend FString operator+ (const TCHAR *Lhs, FString &&Rhs)
 
UE_NODISCARD FORCEINLINE friend FString operator+ (const FString &Lhs, const TCHAR *Rhs)
 
UE_NODISCARD FORCEINLINE friend FString operator+ (FString &&Lhs, const TCHAR *Rhs)
 
template<typename T , typename TEnableIf< TIsTCharRangeNotCArrayNotFString< T >::Value >::Type * = nullptr>
UE_NODISCARD FORCEINLINE friend FString operator+ (T &&Lhs, const FString &Rhs)
 
template<typename T , typename TEnableIf< TIsTCharRangeNotCArrayNotFString< T >::Value >::Type * = nullptr>
UE_NODISCARD FORCEINLINE friend FString operator+ (T &&Lhs, FString &&Rhs)
 
template<typename T , typename TEnableIf< TIsTCharRangeNotCArrayNotFString< T >::Value >::Type * = nullptr>
UE_NODISCARD FORCEINLINE friend FString operator+ (const FString &Lhs, T &&Rhs)
 
template<typename T , typename TEnableIf< TIsTCharRangeNotCArrayNotFString< T >::Value >::Type * = nullptr>
UE_NODISCARD FORCEINLINE friend FString operator+ (FString &&Lhs, T &&Rhs)
 
UE_NODISCARD FORCEINLINE friend FString operator/ (const FString &Lhs, const TCHAR *Rhs)
 
UE_NODISCARD FORCEINLINE friend FString operator/ (FString &&Lhs, const TCHAR *Rhs)
 
UE_NODISCARD FORCEINLINE friend FString operator/ (const FString &Lhs, const FString &Rhs)
 
UE_NODISCARD FORCEINLINE friend FString operator/ (FString &&Lhs, const FString &Rhs)
 
UE_NODISCARD FORCEINLINE friend FString operator/ (const TCHAR *Lhs, const FString &Rhs)
 
UE_NODISCARD FORCEINLINE friend bool operator<= (const FString &Lhs, const FString &Rhs)
 
template<typename CharType >
UE_NODISCARD FORCEINLINE friend bool operator<= (const FString &Lhs, const CharType *Rhs)
 
template<typename CharType >
UE_NODISCARD FORCEINLINE friend bool operator<= (const CharType *Lhs, const FString &Rhs)
 
UE_NODISCARD FORCEINLINE friend bool operator< (const FString &Lhs, const FString &Rhs)
 
template<typename CharType >
UE_NODISCARD FORCEINLINE friend bool operator< (const FString &Lhs, const CharType *Rhs)
 
template<typename CharType >
UE_NODISCARD FORCEINLINE friend bool operator< (const CharType *Lhs, const FString &Rhs)
 
UE_NODISCARD FORCEINLINE friend bool operator>= (const FString &Lhs, const FString &Rhs)
 
template<typename CharType >
UE_NODISCARD FORCEINLINE friend bool operator>= (const FString &Lhs, const CharType *Rhs)
 
template<typename CharType >
UE_NODISCARD FORCEINLINE friend bool operator>= (const CharType *Lhs, const FString &Rhs)
 
UE_NODISCARD FORCEINLINE friend bool operator> (const FString &Lhs, const FString &Rhs)
 
template<typename CharType >
UE_NODISCARD FORCEINLINE friend bool operator> (const FString &Lhs, const CharType *Rhs)
 
template<typename CharType >
UE_NODISCARD FORCEINLINE friend bool operator> (const CharType *Lhs, const FString &Rhs)
 
template<typename CharType >
UE_NODISCARD FORCEINLINE friend bool operator== (const CharType *Lhs, const FString &Rhs)
 
template<typename CharType >
UE_NODISCARD FORCEINLINE friend bool operator!= (const CharType *Lhs, const FString &Rhs)
 
FArchiveoperator<< (FArchive &Ar, FString &S)
 
FORCEINLINE uint32 GetTypeHash (const FString &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.

Definition at line 58 of file UnrealString.h.

Member Typedef Documentation

◆ AllocatorType

◆ DataType

Array holding the character data

Definition at line 108 of file UnrealString.h.

◆ ElementType

Definition at line 152 of file UnrealString.h.

◆ TConstIterator

◆ TIsCharRangeNotCArray

Initial value:

Trait testing whether a type is a contiguous range of characters, and not CharType[].

Definition at line 127 of file UnrealString.h.

◆ TIsCharRangeNotCArrayNotFString

Initial value:

Trait testing whether a type is a contiguous range of characters, and not CharType[] and not FString.

Definition at line 134 of file UnrealString.h.

◆ TIsTCharRangeNotCArray

Initial value:

Trait testing whether a type is a contiguous range of TCHAR, and not TCHAR[].

Definition at line 140 of file UnrealString.h.

◆ TIsTCharRangeNotCArrayNotFString

Initial value:

Trait testing whether a type is a contiguous range of TCHAR, and not TCHAR[] and not FString.

Definition at line 147 of file UnrealString.h.

◆ TIterator

Iterator typedefs

Definition at line 284 of file UnrealString.h.

◆ TRangeElementType

template<typename RangeType >
using FString::TRangeElementType = typename TRemoveCV<typename TRemovePointer<decltype(GetData(DeclVal<RangeType>()))>::Type>::Type
private

Definition at line 112 of file UnrealString.h.

Constructor & Destructor Documentation

◆ FString() [1/21]

FORCEINLINE FString::FString ( const std::wstring & str)
inlineexplicit

Constructor to create FString from std::wstring

Definition at line 85 of file UnrealString.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ FString() [2/21]

FORCEINLINE FString::FString ( const std::string & str)
inlineexplicit

Constructor to create FString from std::string

Definition at line 92 of file UnrealString.h.

+ Here is the call graph for this function:

◆ FString() [3/21]

FString::FString ( )
default
+ Here is the caller graph for this function:

◆ FString() [4/21]

FString::FString ( FString && )
default

◆ FString() [5/21]

FString::FString ( const FString & )
default
+ Here is the caller graph for this function:

◆ FString() [6/21]

FORCEINLINE FString::FString ( const FString & 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

Definition at line 166 of file UnrealString.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ FString() [7/21]

FORCEINLINE FString::FString ( FString && 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

Definition at line 177 of file UnrealString.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ FString() [8/21]

FString::FString ( const ANSICHAR * Str)

Construct from null-terminated C string or nullptr

Definition at line 249 of file String.cpp.

+ Here is the caller graph for this function:

◆ FString() [9/21]

FString::FString ( const WIDECHAR * Str)

Definition at line 250 of file String.cpp.

+ Here is the caller graph for this function:

◆ FString() [10/21]

FString::FString ( const UTF8CHAR * Str)

Definition at line 251 of file String.cpp.

◆ FString() [11/21]

FString::FString ( const UCS2CHAR * Str)

Definition at line 252 of file String.cpp.

◆ FString() [12/21]

FString::FString ( int32 Len,
const ANSICHAR * Str )

Construct from null-terminated C substring or nullptr

Definition at line 253 of file String.cpp.

+ Here is the caller graph for this function:

◆ FString() [13/21]

FString::FString ( int32 Len,
const WIDECHAR * Str )

Definition at line 254 of file String.cpp.

+ Here is the caller graph for this function:

◆ FString() [14/21]

FString::FString ( int32 Len,
const UTF8CHAR * Str )

Definition at line 255 of file String.cpp.

◆ FString() [15/21]

FString::FString ( int32 Len,
const UCS2CHAR * Str )

Definition at line 256 of file String.cpp.

◆ FString() [16/21]

FString::FString ( const ANSICHAR * Str,
int32 ExtraSlack )

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

Definition at line 257 of file String.cpp.

◆ FString() [17/21]

FString::FString ( const WIDECHAR * Str,
int32 ExtraSlack )

Definition at line 258 of file String.cpp.

◆ FString() [18/21]

FString::FString ( const UTF8CHAR * Str,
int32 ExtraSlack )

Definition at line 259 of file String.cpp.

◆ FString() [19/21]

FString::FString ( const UCS2CHAR * Str,
int32 ExtraSlack )

Definition at line 260 of file String.cpp.

◆ FString() [20/21]

FORCEINLINE FString::FString ( CharRangeType && Str)
inlineexplicit

Construct from contiguous range of characters such as FStringView or FStringBuilderBase

Definition at line 202 of file UnrealString.h.

◆ FString() [21/21]

FString::FString ( CharRangeType && Str,
int32 ExtraSlack )
inlineexplicit

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

Definition at line 208 of file UnrealString.h.

Member Function Documentation

◆ Append() [1/3]

FORCEINLINE FString & FString::Append ( CharRangeType && Str)
inline

Append a string and return a reference to this

Definition at line 441 of file UnrealString.h.

◆ Append() [2/3]

template<class CharType >
FORCEINLINE FString & FString::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&&.

Definition at line 432 of file UnrealString.h.

◆ Append() [3/3]

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

Append a string and return a reference to this

Definition at line 418 of file UnrealString.h.

◆ AppendChar()

FString & FString::AppendChar ( TCHAR InChar)
inline

Append a single character and return a reference to this

Definition at line 448 of file UnrealString.h.

+ Here is the call graph for this function:

◆ AppendChars() [1/4]

void FString::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.

Definition at line 345 of file String.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ AppendChars() [2/4]

void FString::AppendChars ( const UCS2CHAR * Str,
int32 Count )

Definition at line 357 of file String.cpp.

+ Here is the call graph for this function:

◆ AppendChars() [3/4]

void FString::AppendChars ( const UTF8CHAR * Str,
int32 Count )

Definition at line 363 of file String.cpp.

+ Here is the call graph for this function:

◆ AppendChars() [4/4]

void FString::AppendChars ( const WIDECHAR * Str,
int32 Count )

Definition at line 351 of file String.cpp.

+ Here is the call graph for this function:

◆ Appendf()

template<typename FmtType , typename... Types>
FString & FString::Appendf ( const FmtType & Fmt,
Types... Args )
inline

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

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

Definition at line 1583 of file UnrealString.h.

◆ AppendfImpl()

void FString::AppendfImpl ( FString & AppendToMe,
const TCHAR * Fmt,
... )
staticprivate

Definition at line 1329 of file String.cpp.

+ Here is the call graph for this function:

◆ AppendInt()

void FString::AppendInt ( int32 InNum)
inline

appends the integer InNum to this string

Definition at line 2297 of file UnrealString.h.

+ Here is the caller graph for this function:

◆ AssignRange()

ARK_API void FString::AssignRange ( const TCHAR * Str,
int32 Len )
private

Definition at line 279 of file String.cpp.

+ Here is the call graph for this function:

◆ begin() [1/2]

FORCEINLINE DataType::RangedForIteratorType FString::begin ( )
inline

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

Definition at line 303 of file UnrealString.h.

◆ begin() [2/2]

FORCEINLINE DataType::RangedForConstIteratorType FString::begin ( ) const
inline

Definition at line 304 of file UnrealString.h.

◆ CheckInvariants()

FORCEINLINE void FString::CheckInvariants ( ) const
inline

Run slow checks on this string

Definition at line 316 of file UnrealString.h.

+ Here is the caller graph for this function:

◆ Chr()

FString FString::Chr ( TCHAR Ch)
static

Returns a string containing only the Ch character

Definition at line 1021 of file String.cpp.

+ Here is the call graph for this function:

◆ ChrN()

FString FString::ChrN ( int32 NumCharacters,
TCHAR 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.

Definition at line 1028 of file String.cpp.

+ Here is the call graph for this function:

◆ Compare()

UE_NODISCARD FORCEINLINE int32 FString::Compare ( const FString & 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

Definition at line 1456 of file UnrealString.h.

+ Here is the caller graph for this function:

◆ ConcatCF() [1/2]

FString FString::ConcatCF ( const TCHAR * Lhs,
const FString & Rhs )
staticprivate

Definition at line 617 of file String.cpp.

◆ ConcatCF() [2/2]

FString FString::ConcatCF ( const TCHAR * Lhs,
FString && Rhs )
staticprivate

Definition at line 618 of file String.cpp.

◆ ConcatFC() [1/2]

FString FString::ConcatFC ( const FString & Lhs,
const TCHAR * Rhs )
staticprivate

Definition at line 615 of file String.cpp.

◆ ConcatFC() [2/2]

FString FString::ConcatFC ( FString && Lhs,
const TCHAR * Rhs )
staticprivate

Definition at line 616 of file String.cpp.

◆ ConcatFF() [1/4]

FString FString::ConcatFF ( const FString & Lhs,
const FString & Rhs )
staticprivate

Definition at line 611 of file String.cpp.

◆ ConcatFF() [2/4]

FString FString::ConcatFF ( const FString & Lhs,
FString && Rhs )
staticprivate

Definition at line 613 of file String.cpp.

◆ ConcatFF() [3/4]

FString FString::ConcatFF ( FString && Lhs,
const FString & Rhs )
staticprivate

Definition at line 612 of file String.cpp.

◆ ConcatFF() [4/4]

FString FString::ConcatFF ( FString && Lhs,
FString && Rhs )
staticprivate

Definition at line 614 of file String.cpp.

◆ ConcatFR() [1/2]

FString FString::ConcatFR ( const FString & Lhs,
const TCHAR * Rhs,
int32 RhsLen )
staticprivate

Definition at line 619 of file String.cpp.

◆ ConcatFR() [2/2]

FString FString::ConcatFR ( FString && Lhs,
const TCHAR * Rhs,
int32 RhsLen )
staticprivate

Definition at line 620 of file String.cpp.

◆ ConcatRF() [1/2]

FString FString::ConcatRF ( const TCHAR * Lhs,
int32 LhsLen,
const FString & Rhs )
staticprivate

Definition at line 621 of file String.cpp.

◆ ConcatRF() [2/2]

FString FString::ConcatRF ( const TCHAR * Lhs,
int32 LhsLen,
FString && Rhs )
staticprivate

Definition at line 622 of file String.cpp.

◆ Contains() [1/4]

UE_NODISCARD FORCEINLINE bool FString::Contains ( const FString & 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.

Definition at line 1343 of file UnrealString.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Contains() [2/4]

UE_NODISCARD FORCEINLINE bool FString::Contains ( const TCHAR * 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.

Definition at line 1329 of file UnrealString.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Contains() [3/4]

UE_NODISCARD FORCEINLINE bool FString::Contains ( const TCHAR * 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.

Definition at line 1358 of file UnrealString.h.

+ Here is the call graph for this function:

◆ Contains() [4/4]

template<typename TCharRangeType , std::enable_if_t< TIsCharRangeNotCArrayNotFString< TCharRangeType >::Value > * = nullptr>
UE_NODISCARD FORCEINLINE bool FString::Contains ( TCharRangeType && 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.

Definition at line 1314 of file UnrealString.h.

◆ ConvertTabsToSpaces() [1/2]

UE_NODISCARD FString FString::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

Definition at line 2266 of file UnrealString.h.

+ Here is the call graph for this function:

◆ ConvertTabsToSpaces() [2/2]

UE_NODISCARD FString FString::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

Definition at line 2254 of file UnrealString.h.

+ Here is the call graph for this function:

◆ ConvertTabsToSpacesInline()

void FString::ConvertTabsToSpacesInline ( const int32 InSpacesPerTab)

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

Parameters
InSpacesPerTab- Number of spaces that a tab represents

Definition at line 1296 of file String.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CountBytes()

FORCEINLINE void FString::CountBytes ( FArchive & Ar) const
inline

Definition at line 2447 of file UnrealString.h.

◆ CreateConstIterator()

FORCEINLINE TConstIterator FString::CreateConstIterator ( ) const
inline

Creates a const iterator for the characters in this string

Definition at line 294 of file UnrealString.h.

◆ CreateIterator()

FORCEINLINE TIterator FString::CreateIterator ( )
inline

Creates an iterator for the characters in this string

Definition at line 288 of file UnrealString.h.

◆ CullArray()

int32 FString::CullArray ( TArray< FString > * InArray)
static

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

Parameters
InArrayThe array to cull
Returns
The number of elements left in InArray

Definition at line 796 of file String.cpp.

◆ Empty() [1/2]

void FString::Empty ( )

Create empty string of given size with zero terminating character

Parameters
Slacklength of empty string to create

Definition at line 321 of file String.cpp.

+ Here is the caller graph for this function:

◆ Empty() [2/2]

void FString::Empty ( int32 Slack)

Definition at line 316 of file String.cpp.

+ Here is the caller graph for this function:

◆ end() [1/2]

Definition at line 305 of file UnrealString.h.

◆ end() [2/2]

FORCEINLINE DataType::RangedForConstIteratorType FString::end ( ) const
inline

Definition at line 306 of file UnrealString.h.

◆ EndsWith() [1/4]

UE_NODISCARD bool FString::EndsWith ( const FString & InSuffix,
ESearchCase::Type SearchCase = ESearchCase::IgnoreCase ) const
inline

Test whether this string ends with given suffix.

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

Definition at line 1770 of file UnrealString.h.

+ Here is the call graph for this function:

◆ EndsWith() [2/4]

UE_NODISCARD bool FString::EndsWith ( const TCHAR * InSuffix,
ESearchCase::Type SearchCase = ESearchCase::IgnoreCase ) const
inline

Test whether this string ends with given suffix.

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

Definition at line 1759 of file UnrealString.h.

+ Here is the caller graph for this function:

◆ EndsWith() [3/4]

bool FString::EndsWith ( const TCHAR * InSuffix,
int32 InSuffixLen,
ESearchCase::Type SearchCase = ESearchCase::IgnoreCase ) const
inline

Test whether this string ends with given suffix.

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

Definition at line 1724 of file UnrealString.h.

+ Here is the caller graph for this function:

◆ EndsWith() [4/4]

template<typename TCharRangeType , std::enable_if_t< TIsCharRangeNotCArrayNotFString< TCharRangeType >::Value > * = nullptr>
UE_NODISCARD bool FString::EndsWith ( TCharRangeType && InSuffix,
ESearchCase::Type SearchCase = ESearchCase::IgnoreCase ) const
inline

Test whether this string ends with given suffix.

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

Definition at line 1747 of file UnrealString.h.

◆ Equals()

UE_NODISCARD FORCEINLINE bool FString::Equals ( const FString & 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

Definition at line 1424 of file UnrealString.h.

+ Here is the caller graph for this function:

◆ Find() [1/4]

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

Searches the string for a substring, and returns index into this string of the first found instance. Can search from beginning or end, and ignore case or not. If substring is empty, returns clamped StartPosition.

Parameters
SubStrThe string array of TCHAR 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.
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.

Definition at line 1222 of file UnrealString.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Find() [2/4]

UE_NODISCARD int32 FString::Find ( const TCHAR * SubStr,
ESearchCase::Type SearchCase = ESearchCase::IgnoreCase,
ESearchDir::Type SearchDir = ESearchDir::FromStart,
int32 StartPosition = INDEX_NONE ) const
inline

Searches the string for a substring, and returns index into this string of the first found instance. Can search from beginning or end, and ignore case or not. If substring is empty, returns clamped StartPosition.

Parameters
SubStrThe string array of TCHAR 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.

Definition at line 1200 of file UnrealString.h.

+ Here is the caller graph for this function:

◆ Find() [3/4]

UE_NODISCARD int32 FString::Find ( const TCHAR * SubStr,
int32 SubStrLen,
ESearchCase::Type SearchCase = ESearchCase::IgnoreCase,
ESearchDir::Type SearchDir = ESearchDir::FromStart,
int32 StartPosition = INDEX_NONE ) const
inline

Searches the string for a substring, and returns index into this string of the first found instance. Can search from beginning or end, and ignore case or not. If substring is empty, returns clamped StartPosition.

Parameters
SubStrThe string array of TCHAR to search for
SubStrLenThe length of the SubStr array
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.
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.

Definition at line 1245 of file UnrealString.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Find() [4/4]

template<typename TCharRangeType , std::enable_if_t< TIsCharRangeNotCArrayNotFString< TCharRangeType >::Value > * = nullptr>
UE_NODISCARD int32 FString::Find ( TCharRangeType && SubStr,
ESearchCase::Type SearchCase = ESearchCase::IgnoreCase,
ESearchDir::Type SearchDir = ESearchDir::FromStart,
int32 StartPosition = INDEX_NONE ) const
inline

Searches the string for a substring, and returns index into this string of the first found instance. Can search from beginning or end, and ignore case or not. If substring is empty, returns clamped StartPosition.

Parameters
SubStrThe string to search for
StartPositionThe start character position to search from
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 )
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.

Definition at line 1184 of file UnrealString.h.

◆ FindChar()

FORCEINLINE bool FString::FindChar ( TCHAR InChar,
int32 & Index ) const
inline

Searches the string for a character

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

Definition at line 1371 of file UnrealString.h.

◆ FindLastChar()

FORCEINLINE bool FString::FindLastChar ( TCHAR InChar,
int32 & Index ) const
inline

Searches the string for the last occurrence of a character

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

Definition at line 1383 of file UnrealString.h.

◆ FindLastCharByPredicate() [1/2]

template<typename Predicate >
FORCEINLINE int32 FString::FindLastCharByPredicate ( Predicate Pred) const
inline

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

Parameters
PredPredicate that takes TCHAR and returns true if TCHAR matches search criteria, false otherwise.
StartIndexIndex of element from which to start searching. Defaults to last TCHAR in string.
Returns
Index of found TCHAR, INDEX_NONE otherwise.

Definition at line 1412 of file UnrealString.h.

◆ FindLastCharByPredicate() [2/2]

template<typename Predicate >
FORCEINLINE int32 FString::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 TCHAR and returns true if TCHAR matches search criteria, false otherwise.
CountThe number of characters from the front of the string through which to search.
Returns
Index of found TCHAR, INDEX_NONE otherwise.

Definition at line 1397 of file UnrealString.h.

◆ Format() [1/3]

template<typename T , typename... Args>
static FString FString::Format ( const T * format,
Args &&... args )
inlinestatic

Definition at line 97 of file UnrealString.h.

◆ Format() [2/3]

static UE_NODISCARD FString FString::Format ( const TCHAR * InFormatString,
const FStringFormatNamedArguments & InNamedArguments )
static

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

◆ Format() [3/3]

static UE_NODISCARD FString FString::Format ( const TCHAR * InFormatString,
const FStringFormatOrderedArguments & InOrderedArguments )
static

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

◆ FormatAsNumber()

FString FString::FormatAsNumber ( int32 InNumber)
static

Definition at line 837 of file String.cpp.

+ Here is the call graph for this function:

◆ FromBlob()

FString FString::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

Definition at line 884 of file String.cpp.

+ Here is the call graph for this function:

◆ FromHexBlob()

FString FString::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

Definition at line 919 of file String.cpp.

+ Here is the call graph for this function:

◆ FromInt()

static UE_NODISCARD FORCEINLINE FString FString::FromInt ( int32 Num)
inlinestatic

Converts an integer to a string.

Definition at line 2289 of file UnrealString.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ FromString()

static FString FString::FromString ( const std::string input)
inlinestatic

Create FString from Ansi std::string

Definition at line 68 of file UnrealString.h.

◆ FromStringUTF8()

static FString FString::FromStringUTF8 ( const std::string input)
inlinestatic

Create FString from UTF8 std::string

Definition at line 78 of file UnrealString.h.

◆ GetAllocatedSize()

FORCEINLINE SIZE_T FString::GetAllocatedSize ( ) const
inline

Definition at line 308 of file UnrealString.h.

◆ GetCharArray() [1/2]

UE_NODISCARD FORCEINLINE const DataType & FString::GetCharArray ( ) const
inline

Get string as const array of TCHARS

Definition at line 396 of file UnrealString.h.

◆ GetCharArray() [2/2]

UE_NODISCARD FORCEINLINE DataType & FString::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.

Definition at line 390 of file UnrealString.h.

+ Here is the caller graph for this function:

◆ InsertAt() [1/2]

void FString::InsertAt ( int32 Index,
const FString & Characters )

Definition at line 469 of file String.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ InsertAt() [2/2]

void FString::InsertAt ( int32 Index,
TCHAR Character )

Definition at line 454 of file String.cpp.

◆ IsEmpty()

UE_NODISCARD FORCEINLINE bool FString::IsEmpty ( ) const
inline

Test whether this string is empty

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

Definition at line 337 of file UnrealString.h.

+ Here is the caller graph for this function:

◆ IsNumeric()

UE_NODISCARD bool FString::IsNumeric ( ) const
inline

Returns true if the string only contains numeric characters

Definition at line 1549 of file UnrealString.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ IsValidIndex()

UE_NODISCARD FORCEINLINE bool FString::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.

Definition at line 369 of file UnrealString.h.

+ Here is the call graph for this function:

◆ Join()

template<typename RangeType >
static UE_NODISCARD FString FString::Join ( const RangeType & Range,
const TCHAR * 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.

Definition at line 2395 of file UnrealString.h.

◆ JoinBy()

template<typename RangeType , typename ProjectionType >
static UE_NODISCARD FString FString::JoinBy ( const RangeType & Range,
const TCHAR * 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.

Definition at line 2426 of file UnrealString.h.

◆ Left() [1/2]

UE_NODISCARD FORCEINLINE FString FString::Left ( int32 Count) &&
inline

Definition at line 1056 of file UnrealString.h.

+ Here is the call graph for this function:

◆ Left() [2/2]

UE_NODISCARD FORCEINLINE FString FString::Left ( int32 Count) const &
inline

Returns the left most given number of characters

Definition at line 1051 of file UnrealString.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ LeftChop() [1/2]

UE_NODISCARD FORCEINLINE FString FString::LeftChop ( int32 Count) &&
inline

Definition at line 1077 of file UnrealString.h.

+ Here is the call graph for this function:

◆ LeftChop() [2/2]

UE_NODISCARD FORCEINLINE FString FString::LeftChop ( int32 Count) const &
inline

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

Definition at line 1071 of file UnrealString.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ LeftChopInline()

FORCEINLINE void FString::LeftChopInline ( int32 Count,
bool bAllowShrinking = true )
inline

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

Definition at line 1084 of file UnrealString.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ LeftInline()

FORCEINLINE void FString::LeftInline ( int32 Count,
bool bAllowShrinking = true )
inline

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

Definition at line 1063 of file UnrealString.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ LeftPad()

FString FString::LeftPad ( int32 ChCount) const

Pad the left of this string for ChCount characters

Definition at line 1042 of file String.cpp.

+ Here is the call graph for this function:

◆ Len()

UE_NODISCARD FORCEINLINE int32 FString::Len ( ) const
inline

Get the length of the string, excluding terminating character

Definition at line 1045 of file UnrealString.h.

+ Here is the caller graph for this function:

◆ MatchesWildcard() [1/4]

UE_NODISCARD bool FString::MatchesWildcard ( const FString & 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

Definition at line 1812 of file UnrealString.h.

+ Here is the call graph for this function:

◆ MatchesWildcard() [2/4]

UE_NODISCARD bool FString::MatchesWildcard ( const TCHAR * 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

Definition at line 1799 of file UnrealString.h.

◆ MatchesWildcard() [3/4]

bool FString::MatchesWildcard ( const TCHAR * Wildcard,
int32 WildcardLen,
ESearchCase::Type SearchCase = ESearchCase::IgnoreCase ) const

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

Definition at line 1106 of file String.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ MatchesWildcard() [4/4]

template<typename TCharRangeType , std::enable_if_t< TIsCharRangeNotCArrayNotFString< TCharRangeType >::Value > * = nullptr>
UE_NODISCARD bool FString::MatchesWildcard ( TCharRangeType && 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

Definition at line 1785 of file UnrealString.h.

◆ Mid() [1/4]

UE_NODISCARD FORCEINLINE FString FString::Mid ( int32 Start) &&
inline

Definition at line 1152 of file UnrealString.h.

+ Here is the call graph for this function:

◆ Mid() [2/4]

UE_NODISCARD FORCEINLINE FString FString::Mid ( int32 Start) const &
inline

Returns the substring from Start position to the end

Definition at line 1151 of file UnrealString.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Mid() [3/4]

UE_NODISCARD FString FString::Mid ( int32 Start,
int32 Count ) &&
inline

Definition at line 1144 of file UnrealString.h.

+ Here is the call graph for this function:

◆ Mid() [4/4]

UE_NODISCARD FString FString::Mid ( int32 Start,
int32 Count ) const &
inline

Returns the substring from Start position for Count characters.

Definition at line 1131 of file UnrealString.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ MidInline()

FORCEINLINE void FString::MidInline ( int32 Start,
int32 Count = MAX_int32,
bool bAllowShrinking = true )
inline

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

Definition at line 1155 of file UnrealString.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ operator!=() [1/2]

template<typename CharType >
UE_NODISCARD FORCEINLINE bool FString::operator!= ( 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

Definition at line 1025 of file UnrealString.h.

◆ operator!=() [2/2]

UE_NODISCARD FORCEINLINE bool FString::operator!= ( const FString & 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

Definition at line 1011 of file UnrealString.h.

+ Here is the call graph for this function:

◆ operator*()

UE_NODISCARD FORCEINLINE const TCHAR * FString::operator* ( ) const
inline

Get pointer to the string

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

Definition at line 379 of file UnrealString.h.

+ Here is the caller graph for this function:

◆ operator+=() [1/2]

template<typename AppendedCharType , std::enable_if_t< TIsCharType< AppendedCharType >::Value > * = nullptr>
FORCEINLINE FString & FString::operator+= ( AppendedCharType Char)
inline

Append a single character and return a reference to this

Definition at line 481 of file UnrealString.h.

◆ operator+=() [2/2]

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

Append a string and return a reference to this

Definition at line 471 of file UnrealString.h.

◆ operator/=() [1/3]

FORCEINLINE FString & FString::operator/= ( CharRangeType && Str)
inline

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

Parameters
Strpath CharRangeType (FString/FStringView/TStringBuilder etc) to be concatenated onto the end of this
Returns
reference to path

Definition at line 694 of file UnrealString.h.

◆ operator/=() [2/3]

template<typename CharType , typename TEnableIf< TIsCharType< CharType >::Value >::Type * = nullptr>
FORCEINLINE FString & FString::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

Definition at line 707 of file UnrealString.h.

◆ operator/=() [3/3]

FORCEINLINE FString & FString::operator/= ( const TCHAR * Str)
inline

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

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

Definition at line 679 of file UnrealString.h.

◆ operator=() [1/4]

FORCEINLINE FString & FString::operator= ( CharRangeType && Range)
inline

Definition at line 247 of file UnrealString.h.

◆ operator=() [2/4]

FString & FString::operator= ( const FString & )
default
+ Here is the caller graph for this function:

◆ operator=() [3/4]

FString & FString::operator= ( const TCHAR * Str)

Definition at line 262 of file String.cpp.

+ Here is the caller graph for this function:

◆ operator=() [4/4]

FString & FString::operator= ( FString && )
default
+ Here is the caller graph for this function:

◆ operator==() [1/2]

template<typename CharType >
UE_NODISCARD FORCEINLINE bool FString::operator== ( 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

Definition at line 984 of file UnrealString.h.

◆ operator==() [2/2]

UE_NODISCARD FORCEINLINE bool FString::operator== ( const FString & 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

Definition at line 970 of file UnrealString.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ operator[]() [1/2]

FORCEINLINE const TCHAR & FString::operator[] ( int32 Index) const
inline

Return specific const character from this string

Parameters
Indexinto string
Returns
const Character at Index

Definition at line 275 of file UnrealString.h.

+ Here is the caller graph for this function:

◆ operator[]() [2/2]

FORCEINLINE TCHAR & FString::operator[] ( int32 Index)
inline

Return specific character from this string

Parameters
Indexinto string
Returns
Character at Index

Definition at line 263 of file UnrealString.h.

+ Here is the caller graph for this function:

◆ ParseIntoArray() [1/2]

ARK_API int32 FString::ParseIntoArray ( TArray< FString > & OutArray,
const TCHAR *const * DelimArray,
int32 NumDelims,
bool InCullEmpty = 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
InArrayThe array to fill with the string pieces
DelimArrayThe strings to delimit on
NumDelimsThe number of delimiters.
Returns
The number of elements in InArray

Definition at line 1162 of file String.cpp.

+ Here is the call graph for this function:

◆ ParseIntoArray() [2/2]

ARK_API int32 FString::ParseIntoArray ( TArray< FString > & OutArray,
const TCHAR * pchDelim,
bool InCullEmpty = true ) const

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

Parameters
InArrayThe array to fill with the string pieces
pchDelimThe string to delimit on
InCullEmptyIf 1, empty strings are not added to the array
Returns
The number of elements in InArray

Definition at line 1080 of file String.cpp.

+ Here is the call graph for this function:

◆ ParseIntoArrayLines()

ARK_API int32 FString::ParseIntoArrayLines ( TArray< FString > & OutArray,
bool InCullEmpty = 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
InArrayThe array to fill with the string pieces
Returns
The number of elements in InArray

Definition at line 1147 of file String.cpp.

◆ ParseIntoArrayWS()

ARK_API int32 FString::ParseIntoArrayWS ( TArray< FString > & OutArray,
const TCHAR * pchExtraDelim = nullptr,
bool InCullEmpty = 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
InArrayThe array to fill with the string pieces
pchExtraDelimThe string to delimit on
Returns
The number of elements in InArray

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

Definition at line 1123 of file String.cpp.

◆ PathAppend()

void FString::PathAppend ( const TCHAR * 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.

Definition at line 630 of file String.cpp.

+ Here is the call graph for this function:

◆ Printf()

template<typename FmtType , typename... Types>
static UE_NODISCARD FString FString::Printf ( const FmtType & Fmt,
Types... Args )
inlinestatic

Constructs FString object similarly to how classic sprintf works.

Parameters
FormatFormat string that specifies how FString 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
FString object that was constructed using format and additional parameters.

Definition at line 1570 of file UnrealString.h.

◆ PrintfImpl()

static FString VARARGS FString::PrintfImpl ( const TCHAR * Fmt,
... )
inlinestaticprivate

Definition at line 1593 of file UnrealString.h.

+ Here is the call graph for this function:

◆ RemoveAt()

void FString::RemoveAt ( int32 Index,
int32 Count = 1,
bool bAllowShrinking = true )

Removes characters within the string.

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

Definition at line 484 of file String.cpp.

+ Here is the caller graph for this function:

◆ RemoveFromEnd() [1/4]

ARK_API bool FString::RemoveFromEnd ( const FString & 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.
Returns
true if the suffix was removed, otherwise false.

Definition at line 580 of file UnrealString.h.

+ Here is the call graph for this function:

◆ RemoveFromEnd() [2/4]

ARK_API bool FString::RemoveFromEnd ( const TCHAR * 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.
Returns
true if the suffix was removed, otherwise false.

Definition at line 569 of file UnrealString.h.

◆ RemoveFromEnd() [3/4]

bool FString::RemoveFromEnd ( const TCHAR * 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.
InSuffixLenlength of InSuffix
Returns
true if the suffix was removed, otherwise false.

Definition at line 505 of file String.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ RemoveFromEnd() [4/4]

template<typename TCharRangeType , std::enable_if_t< TIsCharRangeNotCArrayNotFString< TCharRangeType >::Value > * = nullptr>
bool FString::RemoveFromEnd ( TCharRangeType && 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.
Returns
true if the suffix was removed, otherwise false.

Definition at line 557 of file UnrealString.h.

◆ RemoveFromStart() [1/4]

ARK_API bool FString::RemoveFromStart ( const FString & 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.
Returns
true if the prefix was removed, otherwise false.

Definition at line 536 of file UnrealString.h.

+ Here is the call graph for this function:

◆ RemoveFromStart() [2/4]

ARK_API bool FString::RemoveFromStart ( const TCHAR * 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.
Returns
true if the prefix was removed, otherwise false.

Definition at line 525 of file UnrealString.h.

◆ RemoveFromStart() [3/4]

ARK_API bool FString::RemoveFromStart ( const TCHAR * 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.
InPrefixLenlength of InPrefix
Returns
true if the prefix was removed, otherwise false.

Definition at line 489 of file String.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ RemoveFromStart() [4/4]

template<typename TCharRangeType , std::enable_if_t< TIsCharRangeNotCArrayNotFString< TCharRangeType >::Value > * = nullptr>
bool FString::RemoveFromStart ( TCharRangeType && 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.
Returns
true if the prefix was removed, otherwise false.

Definition at line 513 of file UnrealString.h.

◆ RemoveSpacesInline()

void FString::RemoveSpacesInline ( )

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

Definition at line 425 of file String.cpp.

+ Here is the call graph for this function:

◆ Replace() [1/2]

UE_NODISCARD FString FString::Replace ( const TCHAR * From,
const TCHAR * To,
ESearchCase::Type SearchCase = ESearchCase::IgnoreCase ) &&
inline

Replace all occurrences of a substring in this string

Parameters
Fromsubstring to replace
Tosubstring to replace From with
SearchCaseIndicates whether the search is case sensitive or not ( defaults to ESearchCase::IgnoreCase )
Returns
a copy of this string with the replacement made

Definition at line 2047 of file UnrealString.h.

+ Here is the call graph for this function:

◆ Replace() [2/2]

UE_NODISCARD FString FString::Replace ( const TCHAR * From,
const TCHAR * To,
ESearchCase::Type SearchCase = ESearchCase::IgnoreCase ) const &
inline

Replace all occurrences of a substring in this string

Parameters
Fromsubstring to replace
Tosubstring to replace From with
SearchCaseIndicates whether the search is case sensitive or not ( defaults to ESearchCase::IgnoreCase )
Returns
a copy of this string with the replacement made

Definition at line 1996 of file UnrealString.h.

+ Here is the call graph for this function:

◆ ReplaceCharInline()

void FString::ReplaceCharInline ( const TCHAR SearchChar,
const TCHAR ReplacementChar,
ESearchCase::Type SearchCase = ESearchCase::IgnoreCase )
inline

Replace all occurrences of a character with another.

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

Definition at line 2141 of file UnrealString.h.

+ Here is the call graph for this function:

◆ ReplaceCharInlineCaseSensitive()

void FString::ReplaceCharInlineCaseSensitive ( const TCHAR SearchChar,
const TCHAR ReplacementChar )
private

Definition at line 665 of file String.cpp.

+ Here is the caller graph for this function:

◆ ReplaceCharInlineIgnoreCase()

void FString::ReplaceCharInlineIgnoreCase ( const TCHAR SearchChar,
const TCHAR ReplacementChar )
private

Definition at line 673 of file String.cpp.

+ Here is the caller graph for this function:

◆ ReplaceCharWithEscapedChar() [1/2]

UE_NODISCARD FString FString::ReplaceCharWithEscapedChar ( const TArray< TCHAR > * 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.

Definition at line 2208 of file UnrealString.h.

◆ ReplaceCharWithEscapedChar() [2/2]

UE_NODISCARD FString FString::ReplaceCharWithEscapedChar ( const TArray< TCHAR > * 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.

Definition at line 2193 of file UnrealString.h.

+ Here is the call graph for this function:

◆ ReplaceCharWithEscapedCharInline()

void FString::ReplaceCharWithEscapedCharInline ( const TArray< TCHAR > * 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.

Definition at line 2180 of file UnrealString.h.

◆ ReplaceEscapedCharWithChar() [1/2]

UE_NODISCARD FString FString::ReplaceEscapedCharWithChar ( const TArray< TCHAR > * 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

Definition at line 2237 of file UnrealString.h.

◆ ReplaceEscapedCharWithChar() [2/2]

UE_NODISCARD FString FString::ReplaceEscapedCharWithChar ( const TArray< TCHAR > * 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

Definition at line 2225 of file UnrealString.h.

+ Here is the call graph for this function:

◆ ReplaceEscapedCharWithCharInline()

void FString::ReplaceEscapedCharWithCharInline ( const TArray< TCHAR > * 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().

Definition at line 1276 of file String.cpp.

◆ ReplaceInline()

int32 FString::ReplaceInline ( const TCHAR * SearchText,
const TCHAR * ReplacementText,
ESearchCase::Type SearchCase = ESearchCase::IgnoreCase )
inline

Replace all occurrences of SearchText with ReplacementText in this string.

Parameters
SearchTextthe text that should be removed from this string
ReplacementTextthe text 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.

Definition at line 2063 of file UnrealString.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ReplaceQuotesWithEscapedQuotes() [1/2]

FString FString::ReplaceQuotesWithEscapedQuotes ( ) &&

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

Definition at line 1232 of file String.cpp.

+ Here is the call graph for this function:

◆ ReplaceQuotesWithEscapedQuotes() [2/2]

UE_NODISCARD FString FString::ReplaceQuotesWithEscapedQuotes ( ) const &
inline

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

Definition at line 2163 of file UnrealString.h.

+ Here is the call graph for this function:

◆ Reserve()

void FString::Reserve ( int32 CharacterCount)

Definition at line 307 of file String.cpp.

+ Here is the caller graph for this function:

◆ Reset()

void FString::Reset ( int32 NewReservedSize = 0)
inline

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.

Definition at line 347 of file UnrealString.h.

◆ Reverse() [1/2]

FString FString::Reverse ( ) &&

Returns this string, with the characters in reverse order

Definition at line 811 of file String.cpp.

+ Here is the call graph for this function:

◆ Reverse() [2/2]

FString FString::Reverse ( ) const &

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

Definition at line 804 of file String.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ReverseString()

void FString::ReverseString ( )

Reverses the order of characters in this string

Definition at line 817 of file String.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Right() [1/2]

UE_NODISCARD FORCEINLINE FString FString::Right ( int32 Count) &&
inline

Definition at line 1097 of file UnrealString.h.

+ Here is the call graph for this function:

◆ Right() [2/2]

UE_NODISCARD FORCEINLINE FString FString::Right ( int32 Count) const &
inline

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

Definition at line 1091 of file UnrealString.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ RightChop() [1/2]

UE_NODISCARD FORCEINLINE FString FString::RightChop ( int32 Count) &&
inline

Definition at line 1118 of file UnrealString.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ RightChop() [2/2]

UE_NODISCARD FString FString::RightChop ( int32 Count) const &
inline

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

Definition at line 1111 of file UnrealString.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ RightChopInline()

FORCEINLINE void FString::RightChopInline ( int32 Count,
bool bAllowShrinking = true )
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).

Definition at line 1125 of file UnrealString.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ RightInline()

FORCEINLINE void FString::RightInline ( int32 Count,
bool bAllowShrinking = true )
inline

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

Definition at line 1104 of file UnrealString.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ RightPad()

FString FString::RightPad ( int32 ChCount) const

Pad the right of this string for ChCount characters

Definition at line 1055 of file String.cpp.

+ Here is the call graph for this function:

◆ SanitizeFloat()

UE_ENABLE_OPTIMIZATION_SHIP FString FString::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

Definition at line 964 of file String.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SerializeAsANSICharArray()

void FString::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.

Definition at line 864 of file String.cpp.

+ Here is the call graph for this function:

◆ Shrink()

void FString::Shrink ( )

Remove unallocated empty character space from the end of this string

Definition at line 327 of file String.cpp.

◆ Split() [1/2]

bool FString::Split ( const FString & InS,
FString * LeftS,
FString * RightS ) const

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

Definition at line 414 of file String.cpp.

+ Here is the call graph for this function:

◆ Split() [2/2]

bool FString::Split ( const FString & InS,
FString * LeftS,
FString * 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

Definition at line 384 of file String.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ StartsWith() [1/4]

UE_NODISCARD bool FString::StartsWith ( const FString & InPrefix,
ESearchCase::Type SearchCase = ESearchCase::IgnoreCase ) const
inline

Test whether this string starts with given prefix.

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

Definition at line 1711 of file UnrealString.h.

+ Here is the call graph for this function:

◆ StartsWith() [2/4]

UE_NODISCARD bool FString::StartsWith ( const TCHAR * InPrefix,
ESearchCase::Type SearchCase = ESearchCase::IgnoreCase ) const
inline

Test whether this string starts with given prefix.

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

Definition at line 1700 of file UnrealString.h.

◆ StartsWith() [3/4]

bool FString::StartsWith ( const TCHAR * InPrefix,
int32 InPrefixLen,
ESearchCase::Type SearchCase ) const
inline

Definition at line 1669 of file UnrealString.h.

+ Here is the caller graph for this function:

◆ StartsWith() [4/4]

template<typename TCharRangeType , std::enable_if_t< TIsCharRangeNotCArrayNotFString< TCharRangeType >::Value > * = nullptr>
UE_NODISCARD bool FString::StartsWith ( TCharRangeType && InPrefix,
ESearchCase::Type SearchCase = ESearchCase::IgnoreCase ) const
inline

Test whether this string starts with given prefix.

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

Definition at line 1688 of file UnrealString.h.

◆ ToBlob()

bool FString::ToBlob ( const FString & 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

Definition at line 896 of file String.cpp.

+ Here is the call graph for this function:

◆ ToBool()

UE_NODISCARD bool FString::ToBool ( ) const
inline

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

Definition at line 2330 of file UnrealString.h.

◆ ToHexBlob()

bool FString::ToHexBlob ( const FString & 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

Definition at line 931 of file String.cpp.

+ Here is the call graph for this function:

◆ ToLower() [1/2]

UE_NODISCARD FString FString::ToLower ( ) &&
inline

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

Definition at line 1525 of file UnrealString.h.

+ Here is the call graph for this function:

◆ ToLower() [2/2]

UE_NODISCARD FString FString::ToLower ( ) const &
inline

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

Definition at line 1514 of file UnrealString.h.

+ Here is the call graph for this function:

◆ ToLowerInline()

void FString::ToLowerInline ( )
inline

Converts all characters in this string to lowercase

Definition at line 1532 of file UnrealString.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ToString()

std::string FString::ToString ( ) const
inline

Create Ansi std::string from FString

Definition at line 63 of file UnrealString.h.

◆ ToStringUTF8()

std::string FString::ToStringUTF8 ( ) const
inline

Create UTF8 std::string from FString

Definition at line 73 of file UnrealString.h.

◆ ToUpper() [1/2]

UE_NODISCARD FString FString::ToUpper ( ) &&
inline

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

Definition at line 1496 of file UnrealString.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ToUpper() [2/2]

UE_NODISCARD FString FString::ToUpper ( ) const &
inline

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

Definition at line 1485 of file UnrealString.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ToUpperInline()

void FString::ToUpperInline ( )
inline

Converts all characters in this string to uppercase

Definition at line 1503 of file UnrealString.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ TrimChar() [1/2]

FString FString::TrimChar ( const TCHAR 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).

Definition at line 790 of file String.cpp.

◆ TrimChar() [2/2]

FString FString::TrimChar ( const TCHAR 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

Definition at line 783 of file String.cpp.

+ Here is the call graph for this function:

◆ TrimCharInline()

void FString::TrimCharInline ( const TCHAR 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

Definition at line 738 of file String.cpp.

+ Here is the call graph for this function:

◆ TrimEnd() [1/2]

FString FString::TrimEnd ( ) &&

Removes whitespace characters from the end of this string.

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

Definition at line 732 of file String.cpp.

+ Here is the call graph for this function:

◆ TrimEnd() [2/2]

FString FString::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.

Definition at line 725 of file String.cpp.

+ Here is the call graph for this function:

◆ TrimEndInline()

void FString::TrimEndInline ( )

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

Definition at line 715 of file String.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ TrimQuotes() [1/2]

FString FString::TrimQuotes ( bool * bQuotesRemoved = nullptr) &&

Returns this string with wrapping quotation marks removed.

Definition at line 777 of file String.cpp.

+ Here is the call graph for this function:

◆ TrimQuotes() [2/2]

FString FString::TrimQuotes ( bool * bQuotesRemoved = nullptr) const &

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

Definition at line 770 of file String.cpp.

+ Here is the call graph for this function:

◆ TrimQuotesInline()

void FString::TrimQuotesInline ( bool * bQuotesRemoved = nullptr)

Trims wrapping quotation marks from this string.

Definition at line 765 of file String.cpp.

+ Here is the caller graph for this function:

◆ TrimStart() [1/2]

FString FString::TrimStart ( ) &&

Removes whitespace characters from the start of this string.

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

Definition at line 709 of file String.cpp.

+ Here is the call graph for this function:

◆ TrimStart() [2/2]

FString FString::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.

Definition at line 702 of file String.cpp.

+ Here is the call graph for this function:

◆ TrimStartAndEnd() [1/2]

FString FString::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.

Definition at line 686 of file String.cpp.

+ Here is the call graph for this function:

◆ TrimStartAndEnd() [2/2]

UE_NODISCARD FString FString::TrimStartAndEnd ( ) const &
inline

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.

Definition at line 1836 of file UnrealString.h.

◆ TrimStartAndEndInline()

void FString::TrimStartAndEndInline ( )

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

Definition at line 680 of file String.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ TrimStartInline()

void FString::TrimStartInline ( )

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

Definition at line 692 of file String.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ TrimToNullTerminator()

void FString::TrimToNullTerminator ( )

Trims the inner array after the null terminator.

Definition at line 369 of file String.cpp.

Friends And Related Symbol Documentation

◆ GetTypeHash

FORCEINLINE uint32 GetTypeHash ( const FString & S)
friend

Case insensitive string hash function.

Definition at line 2453 of file UnrealString.h.

◆ operator!=

template<typename CharType >
UE_NODISCARD FORCEINLINE friend bool operator!= ( const CharType * Lhs,
const FString & Rhs )
friend

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

Definition at line 1039 of file UnrealString.h.

◆ operator+ [1/14]

template<typename CharType >
UE_NODISCARD FORCEINLINE friend TEnableIf< TIsCharType< CharType >::Value, FString >::Type operator+ ( const FString & Lhs,
CharType Rhs )
friend

Concatenates an FString with a TCHAR.

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

Definition at line 611 of file UnrealString.h.

◆ operator+ [2/14]

Definition at line 655 of file UnrealString.h.

◆ operator+ [3/14]

UE_NODISCARD FORCEINLINE friend FString operator+ ( const FString & Lhs,
const TCHAR * Rhs )
friend

Definition at line 661 of file UnrealString.h.

◆ operator+ [4/14]

Definition at line 657 of file UnrealString.h.

◆ operator+ [5/14]

Definition at line 669 of file UnrealString.h.

◆ operator+ [6/14]

UE_NODISCARD FORCEINLINE friend FString operator+ ( const TCHAR * Lhs,
const FString & Rhs )
friend

Definition at line 659 of file UnrealString.h.

◆ operator+ [7/14]

UE_NODISCARD FORCEINLINE friend FString operator+ ( const TCHAR * Lhs,
FString && Rhs )
friend

Definition at line 660 of file UnrealString.h.

◆ operator+ [8/14]

template<typename CharType >
UE_NODISCARD FORCEINLINE friend TEnableIf< TIsCharType< CharType >::Value, FString >::Type operator+ ( FString && Lhs,
CharType Rhs )
friend

Concatenates an FString with a TCHAR.

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

Definition at line 630 of file UnrealString.h.

◆ operator+ [9/14]

Definition at line 656 of file UnrealString.h.

◆ operator+ [10/14]

UE_NODISCARD FORCEINLINE friend FString operator+ ( FString && Lhs,
const TCHAR * Rhs )
friend

Definition at line 662 of file UnrealString.h.

◆ operator+ [11/14]

Definition at line 658 of file UnrealString.h.

◆ operator+ [12/14]

Definition at line 671 of file UnrealString.h.

◆ operator+ [13/14]

Definition at line 665 of file UnrealString.h.

◆ operator+ [14/14]

Definition at line 667 of file UnrealString.h.

◆ operator/ [1/5]

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

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

Definition at line 757 of file UnrealString.h.

◆ operator/ [2/5]

UE_NODISCARD FORCEINLINE friend FString operator/ ( const FString & Lhs,
const TCHAR * 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 FString of the path

Definition at line 721 of file UnrealString.h.

◆ operator/ [3/5]

UE_NODISCARD FORCEINLINE friend FString operator/ ( const TCHAR * Lhs,
const FString & 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 FString of the path

Definition at line 789 of file UnrealString.h.

◆ operator/ [4/5]

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

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

Definition at line 773 of file UnrealString.h.

◆ operator/ [5/5]

UE_NODISCARD FORCEINLINE friend FString operator/ ( FString && Lhs,
const TCHAR * 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 FString of the path

Definition at line 739 of file UnrealString.h.

◆ operator< [1/3]

template<typename CharType >
UE_NODISCARD FORCEINLINE friend bool operator< ( const CharType * Lhs,
const FString & Rhs )
friend

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

Definition at line 875 of file UnrealString.h.

◆ operator< [2/3]

template<typename CharType >
UE_NODISCARD FORCEINLINE friend bool operator< ( const FString & Lhs,
const CharType * Rhs )
friend

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

Definition at line 861 of file UnrealString.h.

◆ operator< [3/3]

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

Definition at line 847 of file UnrealString.h.

◆ operator<<

FArchive & operator<< ( FArchive & Ar,
FString & S )
friend

Serializes the string.

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

Definition at line 1363 of file String.cpp.

◆ operator<= [1/3]

template<typename CharType >
UE_NODISCARD FORCEINLINE friend bool operator<= ( const CharType * Lhs,
const FString & Rhs )
friend

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

Definition at line 834 of file UnrealString.h.

◆ operator<= [2/3]

template<typename CharType >
UE_NODISCARD FORCEINLINE friend bool operator<= ( const FString & Lhs,
const CharType * Rhs )
friend

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

Definition at line 820 of file UnrealString.h.

◆ operator<= [3/3]

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

Definition at line 806 of file UnrealString.h.

◆ operator==

template<typename CharType >
UE_NODISCARD FORCEINLINE friend bool operator== ( const CharType * Lhs,
const FString & Rhs )
friend

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

Definition at line 998 of file UnrealString.h.

◆ operator> [1/3]

template<typename CharType >
UE_NODISCARD FORCEINLINE friend bool operator> ( const CharType * Lhs,
const FString & Rhs )
friend

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

Definition at line 957 of file UnrealString.h.

◆ operator> [2/3]

template<typename CharType >
UE_NODISCARD FORCEINLINE friend bool operator> ( const FString & Lhs,
const CharType * Rhs )
friend

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

Definition at line 943 of file UnrealString.h.

◆ operator> [3/3]

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

Definition at line 929 of file UnrealString.h.

◆ operator>= [1/3]

template<typename CharType >
UE_NODISCARD FORCEINLINE friend bool operator>= ( const CharType * Lhs,
const FString & Rhs )
friend

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

Definition at line 916 of file UnrealString.h.

◆ operator>= [2/3]

template<typename CharType >
UE_NODISCARD FORCEINLINE friend bool operator>= ( const FString & Lhs,
const CharType * Rhs )
friend

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

Definition at line 902 of file UnrealString.h.

◆ operator>= [3/3]

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

Definition at line 888 of file UnrealString.h.

Member Data Documentation

◆ Data

DataType FString::Data
private

Definition at line 109 of file UnrealString.h.


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