A dynamically sizeable string. 更多...
#include <UnrealString.h>
类 FString 继承关系图:Public 类型 | |
| typedef TArray< TCHAR >::TIterator | TIterator |
| Iterator typedefs | |
Public 成员函数 | |
| template<typename CharRangeType , typename TEnableIf< TIsCharRangeNotCArray< CharRangeType >::Value >::Type * = nullptr> | |
| FORCEINLINE FString & | Append (CharRangeType &&Str) |
| Append a string and return a reference to this | |
| template<class CharType > | |
| FORCEINLINE FString & | Append (CharType *Str) |
| Append a valid null-terminated string and return a reference to this 更多... | |
| template<class CharType > | |
| FORCEINLINE FString & | Append (const CharType *Str, int32 Count) |
| Append a string and return a reference to this | |
| FORCEINLINE FString & | AppendChar (TCHAR InChar) |
| Append a single character and return a reference to this | |
| void | AppendChars (const ANSICHAR *Str, int32 Count) |
| Appends a character range without null-terminators in it 更多... | |
| template<typename FmtType , typename... Types> | |
| TEnableIf< TIsArrayOrRefOfType< FmtType, TCHAR >::Value, FString & >::Type | Appendf (const FmtType &Fmt, Types... Args) |
| Just like Printf, but appends the formatted text to the existing FString instead. 更多... | |
| void | AppendInt (int32 InNum) |
| appends the integer InNum to this string | |
| FORCEINLINE DataType::RangedForIteratorType | begin () |
| DO NOT USE DIRECTLY STL-like iterators to enable range-based for loop support. | |
| FORCEINLINE void | CheckInvariants () const |
| Run slow checks on this string | |
| FORCEINLINE int32 | Compare (const FString &Other, ESearchCase::Type SearchCase=ESearchCase::CaseSensitive) const |
| Lexicographically tests how this string compares to the Other given string 更多... | |
| FORCEINLINE bool | Contains (const FString &SubStr, ESearchCase::Type SearchCase=ESearchCase::IgnoreCase, ESearchDir::Type SearchDir=ESearchDir::FromStart) const |
| Returns whether this string contains the specified substring. 更多... | |
| FORCEINLINE bool | Contains (const TCHAR *SubStr, ESearchCase::Type SearchCase=ESearchCase::IgnoreCase, ESearchDir::Type SearchDir=ESearchDir::FromStart) const |
| Returns whether this string contains the specified substring. 更多... | |
| FString | ConvertTabsToSpaces (const int32 InSpacesPerTab) && |
| Replaces all instances of '\t' with TabWidth number of spaces 更多... | |
| FString | ConvertTabsToSpaces (const int32 InSpacesPerTab) const & |
| Replaces all instances of '\t' with TabWidth number of spaces 更多... | |
| void | ConvertTabsToSpacesInline (const int32 InSpacesPerTab) |
| Replaces all instances of '\t' with TabWidth number of spaces 更多... | |
| FORCEINLINE TConstIterator | CreateConstIterator () const |
| Creates a const iterator for the characters in this string | |
| FORCEINLINE TIterator | CreateIterator () |
| Creates an iterator for the characters in this string | |
| FORCEINLINE void | Empty (int32 Slack=0) |
| Create empty string of given size with zero terminating character 更多... | |
| bool | EndsWith (const FString &InSuffix, ESearchCase::Type SearchCase=ESearchCase::IgnoreCase) const |
| Test whether this string ends with given string. 更多... | |
| bool | EndsWith (const TCHAR *InSuffix, ESearchCase::Type SearchCase=ESearchCase::IgnoreCase) const |
| Test whether this string ends with given string. 更多... | |
| FORCEINLINE bool | Equals (const FString &Other, ESearchCase::Type SearchCase=ESearchCase::CaseSensitive) const |
| Lexicographically tests whether this string is equivalent to the Other given string 更多... | |
| FORCEINLINE int32 | Find (const FString &SubStr, ESearchCase::Type SearchCase=ESearchCase::IgnoreCase, ESearchDir::Type SearchDir=ESearchDir::FromStart, int32 StartPosition=INDEX_NONE) const |
| Searches the string for a substring, and returns index into this string of the first found instance. 更多... | |
| int32 | Find (const TCHAR *SubStr, ESearchCase::Type SearchCase=ESearchCase::IgnoreCase, ESearchDir::Type SearchDir=ESearchDir::FromStart, int32 StartPosition=INDEX_NONE) const |
| Searches the string for a substring, and returns index into this string of the first found instance. 更多... | |
| FORCEINLINE bool | FindChar (TCHAR InChar, int32 &Index) const |
| Searches the string for a character 更多... | |
| FORCEINLINE bool | FindLastChar (TCHAR InChar, int32 &Index) const |
| Searches the string for the last occurrence of a character 更多... | |
| template<typename Predicate > | |
| FORCEINLINE int32 | FindLastCharByPredicate (Predicate Pred) const |
| Searches the string for the last occurrence of a character which matches the specified predicate. 更多... | |
| template<typename Predicate > | |
| FORCEINLINE int32 | FindLastCharByPredicate (Predicate Pred, int32 Count) const |
| Searches an initial substring for the last occurrence of a character which matches the specified predicate. 更多... | |
| template<typename CharRangeType , typename TEnableIf< TIsCharRangeNotCArray< CharRangeType >::Value >::Type * = nullptr> | |
| FString (CharRangeType &&Other) | |
| Create an FString from a contiguous range of characters 更多... | |
| template<typename CharRangeType , typename TEnableIf< TIsCharRangeNotCArray< CharRangeType >::Value >::Type * = nullptr> | |
| FString (CharRangeType &&Other, int32 ExtraSlack) | |
| Create an FString from a contiguous range of characters, with extra slack at the end of the string 更多... | |
| template<typename CharType , typename = typename TEnableIf<TIsCharType<CharType>::Value>::Type> | |
| FORCEINLINE | FString (const CharType *Src) |
| Constructor using an array of TCHAR 更多... | |
| template<typename CharType , typename = typename TEnableIf<TIsCharType<CharType>::Value>::Type> | |
| FORCEINLINE | FString (const CharType *Src, int32 ExtraSlack) |
| Constructor to create FString with specified number of characters from another string with additional character zero 更多... | |
| FORCEINLINE | FString (const FString &Other, int32 ExtraSlack) |
| Create a copy of the Other string with extra space for characters at the end of the string 更多... | |
| FORCEINLINE | FString (FString &&Other, int32 ExtraSlack) |
| Create a copy of the Other string with extra space for characters at the end of the string 更多... | |
| template<typename CharType , typename = typename TEnableIf<TIsCharType<CharType>::Value>::Type> | |
| FORCEINLINE | FString (int32 InCount, const CharType *InSrc) |
| Constructor to create FString with specified number of characters from another string with additional character zero 更多... | |
| FORCEINLINE DataType & | GetCharArray () |
| Get string as array of TCHARS 更多... | |
| FORCEINLINE const DataType & | GetCharArray () const |
| Get string as const array of TCHARS | |
| FORCEINLINE bool | IsEmpty () const |
| Test whether this string is empty 更多... | |
| bool | IsNumeric () const |
| Returns true if the string only contains numeric characters | |
| FORCEINLINE bool | IsValidIndex (int32 Index) const |
| Tests if index is valid, i.e. 更多... | |
| FORCEINLINE FString | Left (int32 Count) const & |
| Returns the left most given number of characters | |
| FORCEINLINE FString | LeftChop (int32 Count) const & |
| Returns the left most characters from the string chopping the given number of characters from the end | |
| FORCEINLINE void | LeftChopInline (int32 Count, bool bAllowShrinking=true) |
| Modifies the string such that it is now the left most characters chopping the given number of characters from the end | |
| FORCEINLINE void | LeftInline (int32 Count, bool bAllowShrinking=true) |
| Modifies the string such that it is now the left most given number of characters | |
| FString | LeftPad (int32 ChCount) const |
| Pad the left of this string for ChCount characters | |
| FORCEINLINE int32 | Len () const |
| Get the length of the string, excluding terminating character | |
| FORCEINLINE bool | MatchesWildcard (const FString &Wildcard, ESearchCase::Type SearchCase=ESearchCase::IgnoreCase) const |
| Searches this string for a given wild card 更多... | |
| bool | MatchesWildcard (const TCHAR *Wildcard, ESearchCase::Type SearchCase=ESearchCase::IgnoreCase) const |
| Searches this string for a given wild card 更多... | |
| FORCEINLINE FString | Mid (int32 Start, int32 Count=MAX_int32) const & |
| Returns the substring from Start position for Count characters. | |
| FORCEINLINE void | MidInline (int32 Start, int32 Count=MAX_int32, bool bAllowShrinking=true) |
| Modifies the string such that it is now the substring from Start position for Count characters. | |
| FORCEINLINE const TCHAR * | operator* () const |
| Get pointer to the string 更多... | |
| FORCEINLINE FString & | operator+= (ANSICHAR Char) |
| Append a single character and return a reference to this | |
| template<typename StrType > | |
| FORCEINLINE FString & | operator+= (StrType &&Str) |
| Append a string and return a reference to this | |
| FORCEINLINE FString & | operator/= (const FString &Str) |
| Concatenate this path with given path ensuring the / character is used between them 更多... | |
| FORCEINLINE FString & | operator/= (const TCHAR *Str) |
| Concatenate this path with given path ensuring the / character is used between them 更多... | |
| template<typename CharRangeType , typename TEnableIf< TIsTCharRangeNotCArray< CharRangeType >::Value >::Type * = nullptr> | |
| FString & | operator= (CharRangeType &&Other) |
| Copy assignment from a contiguous range of characters | |
| FORCEINLINE FString & | operator= (const TCHAR *Other) |
| Copy Assignment from array of TCHAR 更多... | |
| FORCEINLINE TCHAR & | operator[] (int32 Index) |
| Return specific character from this string 更多... | |
| FORCEINLINE const TCHAR & | operator[] (int32 Index) const |
| Return specific const character from this string 更多... | |
| int32 | 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 更多... | |
| int32 | ParseIntoArray (TArray< FString > &OutArray, const TCHAR *pchDelim, bool InCullEmpty=true) const |
| Breaks up a delimited string into elements of a string array. 更多... | |
| int32 | ParseIntoArrayLines (TArray< FString > &OutArray, bool InCullEmpty=true) const |
| Breaks up a delimited string into elements of a string array, using line ending characters 更多... | |
| int32 | 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 "," 更多... | |
| void | PathAppend (const TCHAR *Str, int32 StrLength) |
| Concatenate this path with given path ensuring the / character is used between them 更多... | |
| FORCEINLINE void | RemoveAt (int32 Index, int32 Count=1, bool bAllowShrinking=true) |
| Removes characters within the string. 更多... | |
| bool | RemoveFromEnd (const FString &InSuffix, ESearchCase::Type SearchCase=ESearchCase::IgnoreCase) |
| Removes the text from the end of the string if it exists. 更多... | |
| bool | RemoveFromEnd (const TCHAR *InSuffix, ESearchCase::Type SearchCase=ESearchCase::IgnoreCase) |
| Removes the text from the end of the string if it exists. 更多... | |
| bool | RemoveFromStart (const FString &InPrefix, ESearchCase::Type SearchCase=ESearchCase::IgnoreCase) |
| Removes the text from the start of the string if it exists. 更多... | |
| bool | RemoveFromStart (const TCHAR *InPrefix, ESearchCase::Type SearchCase=ESearchCase::IgnoreCase) |
| Removes the text from the start of the string if it exists. 更多... | |
| void | RemoveSpacesInline () |
| Removes spaces from the string. 更多... | |
| FString | Replace (const TCHAR *From, const TCHAR *To, ESearchCase::Type SearchCase=ESearchCase::IgnoreCase) && |
| Replace all occurrences of a substring in this string 更多... | |
| FString | Replace (const TCHAR *From, const TCHAR *To, ESearchCase::Type SearchCase=ESearchCase::IgnoreCase) const & |
| Replace all occurrences of a substring in this string 更多... | |
| void | ReplaceCharInline (const TCHAR SearchChar, const TCHAR ReplacementChar, ESearchCase::Type SearchCase=ESearchCase::IgnoreCase) |
| Replace all occurrences of a character with another. 更多... | |
| FString | ReplaceCharWithEscapedChar (const TArray< TCHAR > *Chars=nullptr) && |
| Replaces certain characters with the "escaped" version of that character (i.e. 更多... | |
| FString | ReplaceCharWithEscapedChar (const TArray< TCHAR > *Chars=nullptr) const & |
| Replaces certain characters with the "escaped" version of that character (i.e. 更多... | |
| FString | ReplaceEscapedCharWithChar (const TArray< TCHAR > *Chars=nullptr) && |
| Removes the escape backslash for all supported characters, replacing the escape and character with the non-escaped version. 更多... | |
| FString | ReplaceEscapedCharWithChar (const TArray< TCHAR > *Chars=nullptr) const & |
| Removes the escape backslash for all supported characters, replacing the escape and character with the non-escaped version. 更多... | |
| int32 | ReplaceInline (const TCHAR *SearchText, const TCHAR *ReplacementText, ESearchCase::Type SearchCase=ESearchCase::IgnoreCase) |
| Replace all occurrences of SearchText with ReplacementText in this string. 更多... | |
| FString | ReplaceQuotesWithEscapedQuotes () && |
| Returns a copy of this string with all quote marks escaped (unless the quote is already escaped) | |
| FString | ReplaceQuotesWithEscapedQuotes () const & |
| Returns a copy of this string with all quote marks escaped (unless the quote is already escaped) | |
| FORCEINLINE void | Reset (int32 NewReservedSize=0) |
| Empties the string, but doesn't change memory allocation, unless the new size is larger than the current string. 更多... | |
| FString | Reverse () && |
| Returns this string, with the characters in reverse order | |
| FString | Reverse () const & |
| Returns a copy of this string, with the characters in reverse order | |
| void | ReverseString () |
| Reverses the order of characters in this string | |
| FORCEINLINE FString | Right (int32 Count) const & |
| Returns the string to the right of the specified location, counting back from the right (end of the word). | |
| FORCEINLINE FString | RightChop (int32 Count) const & |
| Returns the string to the right of the specified location, counting forward from the left (from the beginning of the word). | |
| FORCEINLINE void | RightChopInline (int32 Count, bool bAllowShrinking=true) |
| 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). | |
| FORCEINLINE void | RightInline (int32 Count, bool bAllowShrinking=true) |
| Modifies the string such that it is now the right most given number of characters | |
| FString | RightPad (int32 ChCount) const |
| Pad the right of this string for ChCount characters | |
| void | SerializeAsANSICharArray (FArchive &Ar, int32 MinCharacters=0) const |
| Serializes a string as ANSI char array. 更多... | |
| FORCEINLINE void | Shrink () |
| Remove unallocated empty character space from the end of this string | |
| bool | Split (const FString &InS, FString *LeftS, FString *RightS, ESearchCase::Type SearchCase=ESearchCase::IgnoreCase, ESearchDir::Type SearchDir=ESearchDir::FromStart) const |
| Splits this string at given string position case sensitive. 更多... | |
| bool | StartsWith (const FString &InPrefix, ESearchCase::Type SearchCase=ESearchCase::IgnoreCase) const |
| Test whether this string starts with given string. 更多... | |
| bool | StartsWith (const TCHAR *InSuffix, ESearchCase::Type SearchCase=ESearchCase::IgnoreCase) const |
| Test whether this string starts with given string. 更多... | |
| bool | ToBool () const |
| Converts a string into a boolean value 1, "True", "Yes", FCoreTexts::True, FCoreTexts::Yes, and non-zero integers become true 0, "False", "No", FCoreTexts::False, FCoreTexts::No, and unparsable values become false 更多... | |
| FString | ToLower () && |
| Converts all characters in this rvalue string to lowercase and moves it into the returned string. 更多... | |
| FString | ToLower () const & |
| Returns a new string with the characters of this converted to lowercase | |
| void | ToLowerInline () |
| Converts all characters in this string to lowercase | |
| FString | ToUpper () && |
| Converts all characters in this rvalue string to uppercase and moves it into the returned string. 更多... | |
| FString | ToUpper () const & |
| Returns a new string with the characters of this converted to uppercase | |
| void | ToUpperInline () |
| Converts all characters in this string to uppercase | |
| FString | TrimEnd () && |
| Removes whitespace characters from the end of this string. 更多... | |
| FString | TrimEnd () const & |
| Removes whitespace characters from the end of this string. 更多... | |
| void | TrimEndInline () |
| Removes whitespace characters from the end of this string. 更多... | |
| FString | TrimQuotes (bool *bQuotesRemoved=nullptr) && |
| Returns this string with wrapping quotation marks removed. | |
| FString | TrimQuotes (bool *bQuotesRemoved=nullptr) const & |
| Returns a copy of this string with wrapping quotation marks removed. | |
| void | TrimQuotesInline (bool *bQuotesRemoved=nullptr) |
| Trims wrapping quotation marks from this string. | |
| FString | TrimStart () && |
| Removes whitespace characters from the start of this string. 更多... | |
| FString | TrimStart () const & |
| Removes whitespace characters from the start of this string. 更多... | |
| FString | TrimStartAndEnd () && |
| Removes whitespace characters from the start and end of this string. 更多... | |
| FString | TrimStartAndEnd () const & |
| Removes whitespace characters from the start and end of this string. 更多... | |
| void | TrimStartAndEndInline () |
| Removes whitespace characters from the start and end of this string. 更多... | |
| void | TrimStartInline () |
| Removes whitespace characters from the start of this string. 更多... | |
| void | TrimToNullTerminator () |
| Trims the inner array after the null terminator. | |
静态 Public 成员函数 | |
| static FString | Chr (TCHAR Ch) |
| Returns a string containing only the Ch character | |
| static FString | ChrN (int32 NumCharacters, TCHAR Char) |
| Returns a string that is full of a variable number of characters 更多... | |
| static int32 | CullArray (TArray< FString > *InArray) |
| Takes an array of strings and removes any zero length entries. 更多... | |
| static FString | Format (const TCHAR *InFormatString, const FStringFormatNamedArguments &InNamedArguments) |
| Format the specified string using the specified arguments. 更多... | |
| static FString | Format (const TCHAR *InFormatString, const FStringFormatOrderedArguments &InOrderedArguments) |
| Format the specified string using the specified arguments. 更多... | |
| static FString | FromBlob (const uint8 *SrcBuffer, const uint32 SrcSize) |
| Converts a buffer to a string 更多... | |
| static FString | FromHexBlob (const uint8 *SrcBuffer, const uint32 SrcSize) |
| Converts a buffer to a string by hex-ifying the elements 更多... | |
| static FORCEINLINE FString | FromInt (int32 Num) |
| Converts an integer to a string. | |
| template<typename RangeType > | |
| static FString | Join (const RangeType &Range, const TCHAR *Separator) |
| Joins a range of 'something that can be concatentated to strings with +=' together into a single string with separators. 更多... | |
| template<typename RangeType , typename ProjectionType > | |
| static FString | JoinBy (const RangeType &Range, const TCHAR *Separator, ProjectionType Proj) |
| Joins a range of elements together into a single string with separators using a projection function. 更多... | |
| template<typename FmtType , typename... Types> | |
| static TEnableIf< TIsArrayOrRefOfType< FmtType, TCHAR >::Value, FString >::Type | Printf (const FmtType &Fmt, Types... Args) |
| Constructs FString object similarly to how classic sprintf works. 更多... | |
| static FString | SanitizeFloat (double InFloat, const int32 InMinFractionalDigits=1) |
| Converts a float string with the trailing zeros stripped For example - 1.234 will be "1.234" rather than "1.234000" 更多... | |
| static bool | ToBlob (const FString &Source, uint8 *DestBuffer, const uint32 DestSize) |
| Converts a string into a buffer 更多... | |
| static bool | ToHexBlob (const FString &Source, uint8 *DestBuffer, const uint32 DestSize) |
| Converts a string into a buffer 更多... | |
友元 | |
| template<typename CharType > | |
| FORCEINLINE friend bool | operator!= (const CharType *Lhs, const FString &Rhs) |
| Lexicographically test whether the left string is != the right string 更多... | |
| template<typename CharType > | |
| FORCEINLINE friend bool | operator!= (const FString &Lhs, const CharType *Rhs) |
| Lexicographically test whether the left string is != the right string 更多... | |
| FORCEINLINE friend bool | operator!= (const FString &Lhs, const FString &Rhs) |
| Lexicographically test whether the left string is != the right string 更多... | |
| template<typename CharType > | |
| FORCEINLINE friend TEnableIf< TIsCharType< CharType >::Value, FString >::Type | operator+ (const FString &Lhs, CharType Rhs) |
| Concatenates an FString with a TCHAR. 更多... | |
| FORCEINLINE friend FString | operator+ (const FString &Lhs, const FString &Rhs) |
| Concatenate two FStrings. 更多... | |
| FORCEINLINE friend FString | operator+ (const FString &Lhs, const TCHAR *Rhs) |
| Concatenates an FString to a TCHAR array. 更多... | |
| FORCEINLINE friend FString | operator+ (const FString &Lhs, FString &&Rhs) |
| Concatenate two FStrings. 更多... | |
| FORCEINLINE friend FString | operator+ (const TCHAR *Lhs, const FString &Rhs) |
| Concatenates a TCHAR array to an FString. 更多... | |
| FORCEINLINE friend FString | operator+ (const TCHAR *Lhs, FString &&Rhs) |
| Concatenates a TCHAR array to an FString. 更多... | |
| template<typename CharType > | |
| FORCEINLINE friend TEnableIf< TIsCharType< CharType >::Value, FString >::Type | operator+ (FString &&Lhs, CharType Rhs) |
| Concatenates an FString with a TCHAR. 更多... | |
| FORCEINLINE friend FString | operator+ (FString &&Lhs, const FString &Rhs) |
| Concatenate two FStrings. 更多... | |
| FORCEINLINE friend FString | operator+ (FString &&Lhs, const TCHAR *Rhs) |
| Concatenates an FString to a TCHAR array. 更多... | |
| FORCEINLINE friend FString | operator+ (FString &&Lhs, FString &&Rhs) |
| Concatenate two FStrings. 更多... | |
| FORCEINLINE friend FString | operator/ (const FString &Lhs, const FString &Rhs) |
| Concatenate this path with given path ensuring the / character is used between them 更多... | |
| FORCEINLINE friend FString | operator/ (const FString &Lhs, const TCHAR *Rhs) |
| Concatenate this path with given path ensuring the / character is used between them 更多... | |
| FORCEINLINE friend FString | operator/ (const TCHAR *Lhs, const FString &Rhs) |
| Concatenate this path with given path ensuring the / character is used between them 更多... | |
| FORCEINLINE friend FString | operator/ (FString &&Lhs, const FString &Rhs) |
| Concatenate this path with given path ensuring the / character is used between them 更多... | |
| FORCEINLINE friend FString | operator/ (FString &&Lhs, const TCHAR *Rhs) |
| Concatenate this path with given path ensuring the / character is used between them 更多... | |
| template<typename CharType > | |
| FORCEINLINE friend bool | operator< (const CharType *Lhs, const FString &Rhs) |
| Lexicographically test whether the left string is < the right string 更多... | |
| template<typename CharType > | |
| FORCEINLINE friend bool | operator< (const FString &Lhs, const CharType *Rhs) |
| Lexicographically test whether the left string is < the right string 更多... | |
| FORCEINLINE friend bool | operator< (const FString &Lhs, const FString &Rhs) |
| Lexicographically test whether the left string is < the right string 更多... | |
| CORE_API FArchive & | operator<< (FArchive &Ar, FString &S) |
| Serializes the string. 更多... | |
| template<typename CharType > | |
| FORCEINLINE friend bool | operator<= (const CharType *Lhs, const FString &Rhs) |
| Lexicographically test whether the left string is <= the right string 更多... | |
| template<typename CharType > | |
| FORCEINLINE friend bool | operator<= (const FString &Lhs, const CharType *Rhs) |
| Lexicographically test whether the left string is <= the right string 更多... | |
| FORCEINLINE friend bool | operator<= (const FString &Lhs, const FString &Rhs) |
| Lexicographically test whether the left string is <= the right string 更多... | |
| template<typename CharType > | |
| FORCEINLINE friend bool | operator== (const CharType *Lhs, const FString &Rhs) |
| Lexicographically test whether the left string is == the right string 更多... | |
| template<typename CharType > | |
| FORCEINLINE friend bool | operator== (const FString &Lhs, const CharType *Rhs) |
| Lexicographically test whether the left string is == the right string 更多... | |
| FORCEINLINE friend bool | operator== (const FString &Lhs, const FString &Rhs) |
| Lexicographically test whether the left string is == the right string 更多... | |
| template<typename CharType > | |
| FORCEINLINE friend bool | operator> (const CharType *Lhs, const FString &Rhs) |
| Lexicographically test whether the left string is > the right string 更多... | |
| template<typename CharType > | |
| FORCEINLINE friend bool | operator> (const FString &Lhs, const CharType *Rhs) |
| Lexicographically test whether the left string is > the right string 更多... | |
| FORCEINLINE friend bool | operator> (const FString &Lhs, const FString &Rhs) |
| Lexicographically test whether the left string is > the right string 更多... | |
| template<typename CharType > | |
| FORCEINLINE friend bool | operator>= (const CharType *Lhs, const FString &Rhs) |
| Lexicographically test whether the left string is >= the right string 更多... | |
| template<typename CharType > | |
| FORCEINLINE friend bool | operator>= (const FString &Lhs, const CharType *Rhs) |
| Lexicographically test whether the left string is >= the right string 更多... | |
| FORCEINLINE friend bool | operator>= (const FString &Lhs, const FString &Rhs) |
| Lexicographically test whether the left string is >= the right string 更多... | |
A dynamically sizeable string.
|
inline |
Create a copy of the Other string with extra space for characters at the end of the string
| Other | the other string to create a new copy from |
| ExtraSlack | number of extra characters to add to the end of the other string in this string |
|
inline |
Create a copy of the Other string with extra space for characters at the end of the string
| Other | the other string to create a new copy from |
| ExtraSlack | number of extra characters to add to the end of the other string in this string |
|
inline |
Constructor using an array of TCHAR
| In | array of TCHAR |
|
inlineexplicit |
Constructor to create FString with specified number of characters from another string with additional character zero
| InCount | how many characters to copy |
| InSrc | String to copy from |
|
inline |
Constructor to create FString with specified number of characters from another string with additional character zero
| Other | the other string to create a new copy from |
| ExtraSlack | number of extra characters to add to the end of the other string in this string |
|
inlineexplicit |
Create an FString from a contiguous range of characters
| Other | The contiguous character range to copy from |
|
inlineexplicit |
Create an FString from a contiguous range of characters, with extra slack at the end of the string
| Other | The contiguous character range to copy from |
| ExtraSlack | The number of extra characters to reserve space for in the new string |
|
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&&.
| void FString::AppendChars | ( | const ANSICHAR * | Str, |
| int32 | Count | ||
| ) |
Appends a character range without null-terminators in it
| Str | can be null if Count is 0. Can be unterminated, Str[Count] isn't read. |
|
inline |
Just like Printf, but appends the formatted text to the existing FString instead.
|
static |
Returns a string that is full of a variable number of characters
| NumCharacters | Number of characters to put into the string |
| Char | Character to put into the string |
|
inline |
Lexicographically tests how this string compares to the Other given string
| Other | The string test against |
| SearchCase | Whether or not the comparison should ignore case |
|
inline |
Returns whether this string contains the specified substring.
| SubStr | Find to search for |
| SearchCase | Indicates whether the search is case sensitive or not ( defaults to ESearchCase::IgnoreCase ) |
| SearchDir | Indicates whether the search starts at the beginning or at the end ( defaults to ESearchDir::FromStart ) |
|
inline |
Returns whether this string contains the specified substring.
| SubStr | Find to search for |
| SearchCase | Indicates whether the search is case sensitive or not ( defaults to ESearchCase::IgnoreCase ) |
| SearchDir | Indicates whether the search starts at the beginning or at the end ( defaults to ESearchDir::FromStart ) |
|
inline |
Replaces all instances of '\t' with TabWidth number of spaces
| InSpacesPerTab | - Number of spaces that a tab represents |
|
inline |
Replaces all instances of '\t' with TabWidth number of spaces
| InSpacesPerTab | - Number of spaces that a tab represents |
| void FString::ConvertTabsToSpacesInline | ( | const int32 | InSpacesPerTab | ) |
Replaces all instances of '\t' with TabWidth number of spaces
| InSpacesPerTab | - Number of spaces that a tab represents |
Takes an array of strings and removes any zero length entries.
| InArray | The array to cull |
|
inline |
Create empty string of given size with zero terminating character
| Slack | length of empty string to create |
| bool FString::EndsWith | ( | const FString & | InSuffix, |
| ESearchCase::Type | SearchCase = ESearchCase::IgnoreCase |
||
| ) | const |
Test whether this string ends with given string.
| SearchCase | Indicates whether the search is case sensitive or not ( defaults to ESearchCase::IgnoreCase ) |
| bool FString::EndsWith | ( | const TCHAR * | InSuffix, |
| ESearchCase::Type | SearchCase = ESearchCase::IgnoreCase |
||
| ) | const |
Test whether this string ends with given string.
| SearchCase | Indicates whether the search is case sensitive or not ( defaults to ESearchCase::IgnoreCase ) |
|
inline |
Lexicographically tests whether this string is equivalent to the Other given string
| Other | The string test against |
| SearchCase | Whether or not the comparison should ignore case |
|
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.
| SubStr | The string to search for |
| StartPosition | The start character position to search from |
| SearchCase | Indicates whether the search is case sensitive or not ( defaults to ESearchCase::IgnoreCase ) |
| SearchDir | Indicates whether the search starts at the beginning or at the end ( defaults to ESearchDir::FromStart ) |
| int32 FString::Find | ( | const TCHAR * | SubStr, |
| ESearchCase::Type | SearchCase = ESearchCase::IgnoreCase, |
||
| ESearchDir::Type | SearchDir = ESearchDir::FromStart, |
||
| int32 | StartPosition = INDEX_NONE |
||
| ) | const |
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.
| SubStr | The string array of TCHAR to search for |
| StartPosition | The start character position to search from |
| SearchCase | Indicates whether the search is case sensitive or not |
| SearchDir | Indicates whether the search starts at the beginning or at the end. |
|
inline |
Searches the string for a character
| InChar | the character to search for |
| Index | out the position the character was found at, INDEX_NONE if return is false |
|
inline |
Searches the string for the last occurrence of a character
| InChar | the character to search for |
| Index | out the position the character was found at, INDEX_NONE if return is false |
|
inline |
Searches the string for the last occurrence of a character which matches the specified predicate.
| Pred | Predicate that takes TCHAR and returns true if TCHAR matches search criteria, false otherwise. |
| StartIndex | Index of element from which to start searching. Defaults to last TCHAR in string. |
|
inline |
Searches an initial substring for the last occurrence of a character which matches the specified predicate.
| Pred | Predicate that takes TCHAR and returns true if TCHAR matches search criteria, false otherwise. |
| Count | The number of characters from the front of the string through which to search. |
|
static |
Format the specified string using the specified arguments.
Replaces instances of { Argument } with keys in the map matching 'Argument'
| InFormatString | A string representing the format expression |
| InNamedArguments | A map of named arguments that match the tokens specified in InExpression |
|
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
| InFormatString | A string representing the format expression |
| InOrderedArguments | An array of ordered arguments that match the tokens specified in InExpression |
|
static |
Converts a buffer to a string
| SrcBuffer | the buffer to stringify |
| SrcSize | the number of bytes to convert |
|
static |
Converts a buffer to a string by hex-ifying the elements
| SrcBuffer | the buffer to stringify |
| SrcSize | the number of bytes to convert |
|
inline |
Get string as array of TCHARS
|
inline |
Test whether this string is empty
|
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).
| Index | Index to test. |
|
inlinestatic |
Joins a range of 'something that can be concatentated to strings with +=' together into a single string with separators.
| Range | The range of 'things' to concatenate. |
| Separator | The string used to separate each element. |
|
inlinestatic |
Joins a range of elements together into a single string with separators using a projection function.
| Range | The range of 'things' to concatenate. |
| Separator | The string used to separate each element. |
| Proj | The projection used to get a string for each element. |
|
inline |
Searches this string for a given wild card
| Wildcard | *?-type wildcard |
| SearchCase | Indicates whether the search is case sensitive or not ( defaults to ESearchCase::IgnoreCase ) |
| bool FString::MatchesWildcard | ( | const TCHAR * | Wildcard, |
| ESearchCase::Type | SearchCase = ESearchCase::IgnoreCase |
||
| ) | const |
Searches this string for a given wild card
| Wildcard | *?-type wildcard |
| SearchCase | Indicates whether the search is case sensitive or not ( defaults to ESearchCase::IgnoreCase ) |
|
inline |
Get pointer to the string
@Return Pointer to Array of TCHAR if Num, otherwise the empty string
Concatenate this path with given path ensuring the / character is used between them
| Str | path FString to be concatenated onto the end of this |
|
inline |
Concatenate this path with given path ensuring the / character is used between them
| Str | path array of TCHAR to be concatenated onto the end of this |
|
inline |
Copy Assignment from array of TCHAR
| Other | array of TCHAR |
|
inline |
Return specific character from this string
| Index | into string |
|
inline |
Return specific const character from this string
| Index | into string |
| 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
| InArray | The array to fill with the string pieces |
| DelimArray | The strings to delimit on |
| NumDelims | The number of delimiters. |
| int32 FString::ParseIntoArray | ( | TArray< FString > & | OutArray, |
| const TCHAR * | pchDelim, | ||
| bool | InCullEmpty = true |
||
| ) | const |
Breaks up a delimited string into elements of a string array.
| InArray | The array to fill with the string pieces |
| pchDelim | The string to delimit on |
| InCullEmpty | If 1, empty strings are not added to the array |
Breaks up a delimited string into elements of a string array, using line ending characters
| InArray | The array to fill with the string pieces |
| 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 ","
| InArray | The array to fill with the string pieces |
| pchExtraDelim | The string to delimit on |
| void FString::PathAppend | ( | const TCHAR * | Str, |
| int32 | StrLength | ||
| ) |
Concatenate this path with given path ensuring the / character is used between them
| Str | Pointer to an array of TCHARs (not necessarily null-terminated) to be concatenated onto the end of this. |
| StrLength | Exact number of characters from Str to append. |
|
inlinestatic |
Constructs FString object similarly to how classic sprintf works.
| Format | Format 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. |
|
inline |
Removes characters within the string.
| Index | The index of the first character to remove. |
| Count | The number of characters to remove. |
| bAllowShrinking | Whether or not to reallocate to shrink the storage after removal. |
| bool FString::RemoveFromEnd | ( | const FString & | InSuffix, |
| ESearchCase::Type | SearchCase = ESearchCase::IgnoreCase |
||
| ) |
Removes the text from the end of the string if it exists.
| InSuffix | the suffix to search for at the end of the string to remove. |
| bool FString::RemoveFromEnd | ( | const TCHAR * | InSuffix, |
| ESearchCase::Type | SearchCase = ESearchCase::IgnoreCase |
||
| ) |
Removes the text from the end of the string if it exists.
| InSuffix | the suffix to search for at the end of the string to remove. |
| bool FString::RemoveFromStart | ( | const FString & | InPrefix, |
| ESearchCase::Type | SearchCase = ESearchCase::IgnoreCase |
||
| ) |
Removes the text from the start of the string if it exists.
| InPrefix | the prefix to search for at the start of the string to remove. |
| bool FString::RemoveFromStart | ( | const TCHAR * | InPrefix, |
| ESearchCase::Type | SearchCase = ESearchCase::IgnoreCase |
||
| ) |
Removes the text from the start of the string if it exists.
| InPrefix | the prefix to search for at the start of the string to remove. |
| void FString::RemoveSpacesInline | ( | ) |
Removes spaces from the string.
I.E. "Spaces Are Cool" --> "SpacesAreCool".
| FString FString::Replace | ( | const TCHAR * | From, |
| const TCHAR * | To, | ||
| ESearchCase::Type | SearchCase = ESearchCase::IgnoreCase |
||
| ) | && |
Replace all occurrences of a substring in this string
| From | substring to replace |
| To | substring to replace From with |
| SearchCase | Indicates whether the search is case sensitive or not ( defaults to ESearchCase::IgnoreCase ) |
| FString FString::Replace | ( | const TCHAR * | From, |
| const TCHAR * | To, | ||
| ESearchCase::Type | SearchCase = ESearchCase::IgnoreCase |
||
| ) | const & |
Replace all occurrences of a substring in this string
| From | substring to replace |
| To | substring to replace From with |
| SearchCase | Indicates whether the search is case sensitive or not ( defaults to ESearchCase::IgnoreCase ) |
|
inline |
Replace all occurrences of a character with another.
| SearchChar | Character to remove from this FString |
| ReplacementChar | Replacement character |
| SearchCase | Indicates whether the search is case sensitive or not ( defaults to ESearchCase::IgnoreCase ) |
Replaces certain characters with the "escaped" version of that character (i.e.
replaces "\n" with "\\n"). The characters supported are: {
, \r, \t, \', ", \ }.
| Chars | by default, replaces all supported characters; this parameter allows you to limit the replacement to a subset. |
|
inline |
Replaces certain characters with the "escaped" version of that character (i.e.
replaces "\n" with "\\n"). The characters supported are: {
, \r, \t, \', ", \ }.
| Chars | by default, replaces all supported characters; this parameter allows you to limit the replacement to a subset. |
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().
|
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().
| int32 FString::ReplaceInline | ( | const TCHAR * | SearchText, |
| const TCHAR * | ReplacementText, | ||
| ESearchCase::Type | SearchCase = ESearchCase::IgnoreCase |
||
| ) |
Replace all occurrences of SearchText with ReplacementText in this string.
| SearchText | the text that should be removed from this string |
| ReplacementText | the text to insert in its place |
| SearchCase | Indicates whether the search is case sensitive or not ( defaults to ESearchCase::IgnoreCase ) |
|
inline |
Empties the string, but doesn't change memory allocation, unless the new size is larger than the current string.
| NewReservedSize | The expected usage size (in characters, not including the terminator) after calling this function. |
|
static |
Converts a float string with the trailing zeros stripped For example - 1.234 will be "1.234" rather than "1.234000"
| InFloat | The float to sanitize |
| InMinFractionalDigits | The minimum number of fractional digits the number should have (will be padded with zero) |
| void FString::SerializeAsANSICharArray | ( | FArchive & | Ar, |
| int32 | MinCharacters = 0 |
||
| ) | const |
Serializes a string as ANSI char array.
| String | String to serialize |
| Ar | Archive to serialize with |
| MinCharacters | Minimum number of characters to serialize. |
|
inline |
Splits this string at given string position case sensitive.
| InStr | The string to search and split at |
| LeftS | out 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. |
| RightS | out 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. |
| SearchCase | Indicates whether the search is case sensitive or not ( defaults to ESearchCase::IgnoreCase ) |
| SearchDir | Indicates whether the search starts at the beginning or at the end ( defaults to ESearchDir::FromStart ) |
| bool FString::StartsWith | ( | const FString & | InPrefix, |
| ESearchCase::Type | SearchCase = ESearchCase::IgnoreCase |
||
| ) | const |
Test whether this string starts with given string.
| SearchCase | Indicates whether the search is case sensitive or not ( defaults to ESearchCase::IgnoreCase ) |
| bool FString::StartsWith | ( | const TCHAR * | InSuffix, |
| ESearchCase::Type | SearchCase = ESearchCase::IgnoreCase |
||
| ) | const |
Test whether this string starts with given string.
| SearchCase | Indicates whether the search is case sensitive or not ( defaults to ESearchCase::IgnoreCase ) |
|
static |
Converts a string into a buffer
| DestBuffer | the buffer to fill with the string data |
| DestSize | the size of the buffer in bytes (must be at least string len / 3) |
| bool FString::ToBool | ( | ) | const |
Converts a string into a boolean value 1, "True", "Yes", FCoreTexts::True, FCoreTexts::Yes, and non-zero integers become true 0, "False", "No", FCoreTexts::False, FCoreTexts::No, and unparsable values become false
|
static |
Converts a string into a buffer
| DestBuffer | the buffer to fill with the string data |
| DestSize | the size of the buffer in bytes (must be at least string len / 2) |
| FString FString::ToLower | ( | ) | && |
Converts all characters in this rvalue string to lowercase and moves it into the returned string.
| FString FString::ToUpper | ( | ) | && |
Converts all characters in this rvalue string to uppercase and moves it into the returned string.
| FString FString::TrimEnd | ( | ) | && |
Removes whitespace characters from the end of this string.
| FString FString::TrimEnd | ( | ) | const & |
Removes whitespace characters from the end of this string.
| void FString::TrimEndInline | ( | ) |
Removes whitespace characters from the end of this string.
Modifies the string in-place.
| FString FString::TrimStart | ( | ) | && |
Removes whitespace characters from the start of this string.
| FString FString::TrimStart | ( | ) | const & |
Removes whitespace characters from the start of this string.
| FString FString::TrimStartAndEnd | ( | ) | && |
Removes whitespace characters from the start and end of this string.
| FString FString::TrimStartAndEnd | ( | ) | const & |
Removes whitespace characters from the start and end of this string.
| void FString::TrimStartAndEndInline | ( | ) |
Removes whitespace characters from the start and end of this string.
Modifies the string in-place.
| void FString::TrimStartInline | ( | ) |
Removes whitespace characters from the start of this string.
Modifies the string in-place.
|
friend |
Lexicographically test whether the left string is != the right string
| Lhs | String to compare against. |
| Rhs | String to compare against. |
|
friend |
Lexicographically test whether the left string is != the right string
| Lhs | String to compare against. |
| Rhs | String to compare against. |
Lexicographically test whether the left string is != the right string
| Lhs | String to compare against. |
| Rhs | String to compare against. |
|
friend |
|
friend |
Concatenate this path with given path ensuring the / character is used between them
| Lhs | Path to concatenate onto. |
| Rhs | Path to concatenate. |
Concatenate this path with given path ensuring the / character is used between them
| Lhs | Path to concatenate onto. |
| Rhs | Path to concatenate. |
Concatenate this path with given path ensuring the / character is used between them
| Lhs | Path to concatenate onto. |
| Rhs | Path to concatenate. |
Concatenate this path with given path ensuring the / character is used between them
| Lhs | Path to concatenate onto. |
| Rhs | Path to concatenate. |
Concatenate this path with given path ensuring the / character is used between them
| Lhs | Path to concatenate onto. |
| Rhs | Path to concatenate. |
|
friend |
Lexicographically test whether the left string is < the right string
| Lhs | String to compare against. |
| Rhs | String to compare against. |
|
friend |
Lexicographically test whether the left string is < the right string
| Lhs | String to compare against. |
| Rhs | String to compare against. |
Lexicographically test whether the left string is < the right string
| Lhs | String to compare against. |
| Rhs | String to compare against. |
Serializes the string.
| Ar | Reference to the serialization archive. |
| S | Reference to the string being serialized. |
|
friend |
Lexicographically test whether the left string is <= the right string
| Lhs | String to compare against. |
| Rhs | String to compare against. |
|
friend |
Lexicographically test whether the left string is <= the right string
| Lhs | String to compare against. |
| Rhs | String to compare against. |
Lexicographically test whether the left string is <= the right string
| Lhs | String to compare against. |
| Rhs | String to compare against. |
|
friend |
Lexicographically test whether the left string is == the right string
| Lhs | String to compare against. |
| Rhs | String to compare against. |
|
friend |
Lexicographically test whether the left string is == the right string
| Lhs | String to compare against. |
| Rhs | String to compare against. |
Lexicographically test whether the left string is == the right string
| Lhs | String to compare against. |
| Rhs | String to compare against. |
|
friend |
Lexicographically test whether the left string is > the right string
| Lhs | String to compare against. |
| Rhs | String to compare against. |
|
friend |
Lexicographically test whether the left string is > the right string
| Lhs | String to compare against. |
| Rhs | String to compare against. |
Lexicographically test whether the left string is > the right string
| Lhs | String to compare against. |
| Rhs | String to compare against. |
|
friend |
Lexicographically test whether the left string is >= the right string
| Lhs | String to compare against. |
| Rhs | String to compare against. |
|
friend |
Lexicographically test whether the left string is >= the right string
| Lhs | String to compare against. |
| Rhs | String to compare against. |
Lexicographically test whether the left string is >= the right string
| Lhs | String to compare against. |
| Rhs | String to compare against. |