Module |
|
Header |
/Engine/Source/Runtime/Core/Public/Containers/UnrealString.h |
Include |
#include "Containers/UnrealString.h" |
class FString
A dynamically sizeable string. 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 or escape sequences rather than to specify Unicode code points.
Name | Description | |
---|---|---|
|
FString() |
|
|
FString ( |
Create a copy of the Other string with extra space for characters at the end of the string |
|
FString ( |
Construct from null-terminated C substring or nullptr |
|
FString ( |
|
|
FString ( |
|
|
FString ( |
|
|
FString ( |
Construct from null-terminated C string or nullptr with extra slack on top of original string length |
|
FString ( |
|
|
FString ( |
|
|
FString ( |
|
|
FString ( |
Construct from contiguous range of characters with extra slack on top of original string length |
|
FString ( |
|
|
FString ( |
|
|
FString ( |
Construct from null-terminated C string or nullptr |
|
FString ( |
|
|
FString ( |
|
|
FString ( |
|
|
FString ( |
Construct from contiguous range of characters such as FStringView or FStringBuilderBase |
|
FString ( |
Create a copy of the Other string with extra space for characters at the end of the string |
Name | Description | ||
---|---|---|---|
|
FString & |
Append ( |
Append a string and return a reference to this |
|
FString & |
Append ( |
Append a string and return a reference to this |
|
FString & |
Append ( |
Append a valid null-terminated string and return a reference to this |
|
FString & |
AppendChar ( |
Append a single character and return a reference to this |
|
void |
AppendChars ( |
Appends a character range without null-terminators in it |
|
void |
AppendChars ( |
Appends a character range without null-terminators in it |
|
void |
AppendChars ( |
Appends a character range without null-terminators in it |
|
void |
AppendChars ( |
Appends a character range without null-terminators in it |
|
FString & |
Appendf ( |
Just like Printf, but appends the formatted text to the existing FString instead. |
|
void |
AppendInt ( |
Appends the integer InNum to this string |
|
DataType::Ra... |
begin() |
DO NOT USE DIRECTLY STL-like iterators to enable range-based for loop support. |
|
DataType::Ra... |
begin() |
|
|
void |
CheckInvariants() |
Run slow checks on this string |
|
Chr ( |
Returns a string containing only the Ch character |
|
|
ChrN ( |
Returns a string that is full of a variable number of characters |
|
|
int32 |
Compare ( |
Lexicographically tests how this string compares to the Other given string |
|
bool |
Contains ( |
Returns whether this string contains the specified substring. |
|
bool |
Contains ( |
Returns whether this string contains the specified substring. |
|
bool |
Contains ( |
Returns whether this string contains the specified substring. |
|
bool |
Contains ( |
Returns whether this string contains the specified substring. |
|
ConvertTabsToSpaces ( |
Replaces all instances of '' with TabWidth number of spaces |
|
|
ConvertTabsToSpaces ( |
Replaces all instances of '' with TabWidth number of spaces |
|
|
void |
ConvertTabsToSpacesInline ( |
Replaces all instances of '' with TabWidth number of spaces |
|
void |
CountBytes ( |
|
|
TConstIterat... |
CreateConstIterator() |
Creates a const iterator for the characters in this string |
|
CreateIterator() |
Creates an iterator for the characters in this string |
|
|
int32 |
CullArray |
Takes an array of strings and removes any zero length entries. |
|
void |
Empty() |
Create empty string of given size with zero terminating character |
|
void |
Empty ( |
Create empty string of given size with zero terminating character |
|
DataType::Ra... |
end() |
|
|
DataType::Ra... |
end() |
|
|
bool |
EndsWith ( |
Test whether this string ends with given suffix. |
|
bool |
EndsWith ( |
Test whether this string ends with given suffix. |
|
bool |
EndsWith ( |
Test whether this string ends with given suffix. |
|
bool |
EndsWith ( |
Test whether this string ends with given suffix. |
|
bool |
Equals ( |
Lexicographically tests whether this string is equivalent to the Other given string |
|
int32 |
Find ( |
Searches the string for a substring, and returns index into this string of the first found instance. |
|
int32 |
Find ( |
Searches the string for a substring, and returns index into this string of the first found instance. |
|
int32 |
Find ( |
Searches the string for a substring, and returns index into this string of the first found instance. |
|
int32 |
Find ( |
Searches the string for a substring, and returns index into this string of the first found instance. |
|
bool |
FindChar ( |
Searches the string for a character |
|
bool |
FindLastChar ( |
Searches the string for the last occurrence of a character |
|
int32 |
FindLastCharByPredicate ( |
Searches an initial substring for the last occurrence of a character which matches the specified predicate. |
|
int32 |
FindLastCharByPredicate ( |
Searches the string for the last occurrence of a character which matches the specified predicate. |
|
Format ( |
Format the specified string using the specified arguments. |
|
|
Format ( |
Format the specified string using the specified arguments. |
|
|
FormatAsNumber ( |
Takes the number passed in and formats the string in comma format ( 12345 becomes "12,345") |
|
|
FromBlob ( |
Converts a buffer to a string |
|
|
FromHexBlob ( |
Converts a buffer to a string by hex-ifying the elements |
|
|
FromInt ( |
Converts an integer to a string. |
|
|
SIZE_T |
GetAllocatedSize() |
|
|
DataType & |
GetCharArray() |
Get string as array of TCHARS |
|
const DataTy... |
GetCharArray() |
Get string as const array of TCHARS |
|
void |
InsertAt ( |
|
|
void |
InsertAt ( |
|
|
bool |
IsEmpty() |
Test whether this string is empty |
|
bool |
IsNumeric() |
Returns true if the string only contains numeric characters |
|
bool |
IsValidIndex ( |
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). |
|
Join ( |
Joins a range of 'something that can be concatentated to strings with +=' together into a single string with separators. |
|
|
JoinBy ( |
Joins a range of elements together into a single string with separators using a projection function. |
|
|
Left ( |
||
|
Left ( |
Returns the left most given number of characters |
|
|
LeftChop ( |
||
|
LeftChop ( |
Returns the left most characters from the string chopping the given number of characters from the end |
|
|
void |
LeftChopInline ( |
Modifies the string such that it is now the left most characters chopping the given number of characters from the end |
|
void |
LeftInline ( |
Modifies the string such that it is now the left most given number of characters |
|
LeftPad ( |
Pad the left of this string for ChCount characters |
|
|
int32 |
Len() |
Get the length of the string, excluding terminating character |
|
bool |
MatchesWildcard ( |
Searches this string for a given wild card This is a simple, SLOW routine. Use with caution |
|
bool |
MatchesWildcard ( |
Searches this string for a given wild card This is a simple, SLOW routine. Use with caution |
|
bool |
MatchesWildcard ( |
Searches this string for a given wild card This is a simple, SLOW routine. Use with caution |
|
bool |
MatchesWildcard ( |
Searches this string for a given wild card This is a simple, SLOW routine. Use with caution |
|
Mid ( |
||
|
Mid ( |
Returns the substring from Start position for Count characters. |
|
|
Mid ( |
||
|
Mid ( |
Returns the substring from Start position to the end |
|
|
void |
MidInline ( |
Modifies the string such that it is now the substring from Start position for Count characters. |
|
int32 |
ParseIntoArray |
Breaks up a delimited string into elements of a string array, using the given delimiters |
|
int32 |
ParseIntoArray |
Breaks up a delimited string into elements of a string array. |
|
int32 |
ParseIntoArrayLines |
Breaks up a delimited string into elements of a string array, using line ending characters |
|
int32 |
ParseIntoArrayWS |
Breaks up a delimited string into elements of a string array, using any whitespace and an optional extra delimter, like a "," |
|
void |
PathAppend ( |
Concatenate this path with given path ensuring the / character is used between them |
|
Printf ( |
Constructs FString object similarly to how classic sprintf works. |
|
|
void |
RemoveAt ( |
Removes characters within the string. |
|
bool |
RemoveFromEnd ( |
Removes the text from the end of the string if it exists. |
|
bool |
RemoveFromEnd ( |
Removes the text from the end of the string if it exists. |
|
bool |
RemoveFromEnd ( |
Removes the text from the end of the string if it exists. |
|
bool |
RemoveFromEnd ( |
Removes the text from the end of the string if it exists. |
|
bool |
RemoveFromStart ( |
Removes the text from the start of the string if it exists. |
|
bool |
RemoveFromStart ( |
Removes the text from the start of the string if it exists. |
|
bool |
RemoveFromStart ( |
Removes the text from the start of the string if it exists. |
|
bool |
RemoveFromStart ( |
Removes the text from the start of the string if it exists. |
|
void |
RemoveSpacesInline() |
Removes spaces from the string. I.E. "Spaces Are Cool" > "SpacesAreCool". |
|
Replace ( |
Replace all occurrences of a substring in this string |
|
|
Replace ( |
Replace all occurrences of a substring in this string |
|
|
void |
ReplaceCharInline ( |
Replace all occurrences of a character with another. no dynamic allocation |
|
ReplaceCharWithEscapedChar ( |
Replaces certain characters with the "escaped" version of that character (i.e. replaces "\n" with "\n"). |
|
|
ReplaceCharWithEscapedChar ( |
Replaces certain characters with the "escaped" version of that character (i.e. replaces "\n" with "\n"). |
|
|
void |
ReplaceCharWithEscapedCharInline ( |
Replaces certain characters with the "escaped" version of that character (i.e. replaces "\n" with "\n"). |
|
ReplaceEscapedCharWithChar ( |
Removes the escape backslash for all supported characters, replacing the escape and character with the non-escaped version. |
|
|
ReplaceEscapedCharWithChar ( |
Removes the escape backslash for all supported characters, replacing the escape and character with the non-escaped version. |
|
|
void |
ReplaceEscapedCharWithCharInline ( |
Removes the escape backslash for all supported characters, replacing the escape and character with the non-escaped version. |
|
int32 |
ReplaceInline ( |
Replace all occurrences of SearchText with ReplacementText in this string. |
|
ReplaceQuotesWithEscapedQuotes() |
Returns a copy of this string with all quote marks escaped (unless the quote is already escaped) |
|
|
ReplaceQuotesWithEscapedQuotes() |
Returns a copy of this string with all quote marks escaped (unless the quote is already escaped) |
|
|
void |
Reserve ( |
To allow more efficient memory handling, automatically adds one for the string termination. |
|
void |
Reset ( |
Empties the string, but doesn't change memory allocation, unless the new size is larger than the current string. |
|
Reverse() |
Returns this string, with the characters in reverse order |
|
|
Reverse() |
Returns a copy of this string, with the characters in reverse order |
|
|
void |
ReverseString() |
Reverses the order of characters in this string |
|
Right ( |
Returns the string to the right of the specified location, counting back from the right (end of the word). |
|
|
Right ( |
||
|
RightChop ( |
Returns the string to the right of the specified location, counting forward from the left (from the beginning of the word). |
|
|
RightChop ( |
||
|
void |
RightChopInline ( |
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). |
|
void |
RightInline ( |
Modifies the string such that it is now the right most given number of characters |
|
RightPad ( |
Pad the right of this string for ChCount characters |
|
|
SanitizeFloat ( |
Converts a float string with the trailing zeros stripped For example - 1.234 will be "1.234" rather than "1.234000" |
|
|
void |
SerializeAsANSICharArray ( |
Serializes a string as ANSI char array. |
|
void |
Shrink() |
Remove unallocated empty character space from the end of this string |
|
bool |
Split ( |
Splits this string at given string position case sensitive. |
|
bool |
Split |
Split with ESearchCase::IgnoreCase and ESearchDir::FromStart. |
|
bool |
StartsWith ( |
Test whether this string starts with given prefix. |
|
bool |
StartsWith ( |
Test whether this string starts with given prefix. |
|
bool |
StartsWith ( |
Test whether this string starts with given prefix. |
|
bool |
StartsWith ( |
Test whether this string starts with given prefix. |
|
bool |
ToBlob ( |
Converts a string into a buffer |
|
bool |
ToBool() |
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 |
|
bool |
ToHexBlob ( |
Converts a string into a buffer |
|
ToLower() |
Converts all characters in this rvalue string to lowercase and moves it into the returned string. |
|
|
ToLower() |
Returns a new string with the characters of this converted to lowercase |
|
|
void |
ToLowerInline() |
Converts all characters in this string to lowercase |
|
ToUpper() |
Converts all characters in this rvalue string to uppercase and moves it into the returned string. |
|
|
ToUpper() |
Returns a new string with the characters of this converted to uppercase |
|
|
void |
ToUpperInline() |
Converts all characters in this string to uppercase |
|
TrimChar ( |
Returns a copy of this string with wrapping CharacterToTrim removed (removes at max one instance in the beginning and end of the string). |
|
|
TrimChar ( |
Returns a copy of this string with wrapping CharacterToTrim removed (removes at max one instance in the beginning and end of the string). |
|
|
void |
TrimCharInline ( |
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). |
|
TrimEnd() |
Removes whitespace characters from the end of this string. |
|
|
TrimEnd() |
Removes whitespace characters from the end of this string. |
|
|
void |
TrimEndInline() |
Removes whitespace characters from the end of this string. Modifies the string in-place. |
|
TrimQuotes ( |
Returns a copy of this string with wrapping quotation marks removed. |
|
|
TrimQuotes ( |
Returns this string with wrapping quotation marks removed. |
|
|
void |
TrimQuotesInline ( |
Trims wrapping quotation marks from this string. |
|
TrimStart() |
Removes whitespace characters from the start of this string. |
|
|
TrimStart() |
Removes whitespace characters from the start of this string. |
|
|
TrimStartAndEnd() |
Removes whitespace characters from the start and end of this string. |
|
|
TrimStartAndEnd() |
Removes whitespace characters from the start and end of this string. |
|
|
void |
TrimStartAndEndInline() |
Removes whitespace characters from the start and end of this string. Modifies the string in-place. |
|
void |
TrimStartInline() |
Removes whitespace characters from the start of this string. Modifies the string in-place. |
|
void |
TrimToNullTerminator() |
Trims the inner array after the null terminator. |
Name | Description | ||
---|---|---|---|
|
bool |
operator!= ( |
Lexicographically test whether the left string is != the right string case insensitive |
|
bool |
operator!= ( |
Lexicographically test whether the left string is != the right string case insensitive |
|
const TCHAR ... |
operator*() |
Get pointer to the string Pointer to Array of TCHAR if Num, otherwise the empty string |
|
FString & |
operator/= ( |
Concatenate this path with given path ensuring the / character is used between them |
|
FString & |
operator/= ( |
Concatenate this path with given path ensuring the / character is used between them |
|
FString & |
operator/= ( |
Concatenate this path with given path ensuring the / character is used between them |
|
const TCHAR ... |
operator[] ( |
Return specific const character from this string |
|
TCHAR & |
operator[] ( |
Return specific character from this string |
|
FString & |
operator+= ( |
Append a single character and return a reference to this |
|
auto |
operator+= ( |
Append a string and return a reference to this |
|
FString & |
operator= ( |
|
|
FString & |
operator= ( |
|
|
FString & |
operator= ( |
|
|
FString & |
operator= ( |
|
|
bool |
operator== ( |
Lexicographically test whether the left string is == the right string case insensitive |
|
bool |
operator== ( |
Lexicographically test whether the left string is == the right string case insensitive |
Name |
Description |
---|---|
AllocatorType |
|
DataType |
Array holding the character data |
ElementType |
|
TConstIterator |
|
TIsCharRangeNotCArray |
Trait testing whether a type is a contiguous range of characters, and not CharType[]. |
TIsCharRangeNotCArrayNotFString |
Trait testing whether a type is a contiguous range of characters, and not CharType[] and not FString. |
TIsTCharRangeNotCArray |
Trait testing whether a type is a contiguous range of TCHAR, and not TCHAR[]. |
TIsTCharRangeNotCArrayNotFString |
Trait testing whether a type is a contiguous range of TCHAR, and not TCHAR[] and not FString. |
TIterator |
Iterator typedefs |
TRangeElementType |