Ark Server API (ASA) - Wiki
|
#include <UnrealString.h>
Classes | |
struct | TIsRangeOfCharType |
struct | TIsRangeOfTCHAR |
Public Types | |
using | AllocatorType = TSizedDefaultAllocator<32> |
using | ElementType = TCHAR |
typedef DataType::TIterator | TIterator |
typedef DataType::TConstIterator | TConstIterator |
Private Types | |
typedef TArray< TCHAR, AllocatorType > | DataType |
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) |
Private Attributes | |
DataType | Data |
A dynamically sizeable string.
When dealing with UTF-8 literals, the following advice is recommended:
Definition at line 58 of file UnrealString.h.
Definition at line 61 of file UnrealString.h.
|
private |
Array holding the character data
Definition at line 108 of file UnrealString.h.
using FString::ElementType = TCHAR |
Definition at line 152 of file UnrealString.h.
Definition at line 285 of file UnrealString.h.
|
private |
Trait testing whether a type is a contiguous range of characters, and not CharType[].
Definition at line 127 of file UnrealString.h.
|
private |
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.
|
private |
Trait testing whether a type is a contiguous range of TCHAR, and not TCHAR[].
Definition at line 140 of file UnrealString.h.
|
private |
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.
Iterator typedefs
Definition at line 284 of file UnrealString.h.
|
private |
Definition at line 112 of file UnrealString.h.
|
inlineexplicit |
Constructor to create FString from std::wstring
Definition at line 85 of file UnrealString.h.
|
inlineexplicit |
Constructor to create FString from std::string
Definition at line 92 of file UnrealString.h.
|
default |
|
default |
|
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 |
Definition at line 166 of file UnrealString.h.
|
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 |
Definition at line 177 of file UnrealString.h.
FString::FString | ( | const ANSICHAR * | Str | ) |
Construct from null-terminated C string or nullptr
Definition at line 249 of file String.cpp.
Definition at line 251 of file String.cpp.
Definition at line 252 of file String.cpp.
Construct from null-terminated C substring or nullptr
Definition at line 253 of file String.cpp.
Definition at line 255 of file String.cpp.
Definition at line 256 of file String.cpp.
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.
Definition at line 258 of file String.cpp.
Definition at line 259 of file String.cpp.
Definition at line 260 of file String.cpp.
|
inlineexplicit |
Construct from contiguous range of characters such as FStringView or FStringBuilderBase
Definition at line 202 of file UnrealString.h.
|
inlineexplicit |
Construct from contiguous range of characters with extra slack on top of original string length
Definition at line 208 of file UnrealString.h.
|
inline |
Append a string and return a reference to this
Definition at line 441 of file UnrealString.h.
|
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.
|
inline |
Append a string and return a reference to this
Definition at line 418 of file UnrealString.h.
|
inline |
Append a single character and return a reference to this
Definition at line 448 of file UnrealString.h.
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. |
Definition at line 345 of file String.cpp.
Just like Printf, but appends the formatted text to the existing FString instead.
Definition at line 1583 of file UnrealString.h.
appends the integer InNum to this string
Definition at line 2297 of file UnrealString.h.
|
inline |
DO NOT USE DIRECTLY STL-like iterators to enable range-based for loop support.
Definition at line 303 of file UnrealString.h.
|
inline |
Definition at line 304 of file UnrealString.h.
|
inline |
Run slow checks on this string
Definition at line 316 of file UnrealString.h.
|
static |
Returns a string containing only the Ch character
Definition at line 1021 of file String.cpp.
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 |
Definition at line 1028 of file String.cpp.
|
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 |
Definition at line 1456 of file UnrealString.h.
Definition at line 617 of file String.cpp.
Definition at line 618 of file String.cpp.
Definition at line 615 of file String.cpp.
Definition at line 616 of file String.cpp.
Definition at line 611 of file String.cpp.
Definition at line 613 of file String.cpp.
Definition at line 612 of file String.cpp.
Definition at line 614 of file String.cpp.
Definition at line 619 of file String.cpp.
Definition at line 620 of file String.cpp.
Definition at line 621 of file String.cpp.
Definition at line 622 of file String.cpp.
|
inline |
Returns whether this string contains the specified substring.
SubStr | Text 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 ) |
Definition at line 1343 of file UnrealString.h.
|
inline |
Returns whether this string contains the specified substring.
SubStr | Text 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 ) |
Definition at line 1329 of file UnrealString.h.
|
inline |
Returns whether this string contains the specified substring.
SubStr | Text to search for |
SubStrLen | Length of the Text |
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 ) |
Definition at line 1358 of file UnrealString.h.
|
inline |
Returns whether this string contains the specified substring.
SubStr | Text 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 ) |
Definition at line 1314 of file UnrealString.h.
|
inline |
Replaces all instances of '\t' with TabWidth number of spaces
InSpacesPerTab | - Number of spaces that a tab represents |
Definition at line 2266 of file UnrealString.h.
|
inline |
Replaces all instances of '\t' with TabWidth number of spaces
InSpacesPerTab | - Number of spaces that a tab represents |
Definition at line 2254 of file UnrealString.h.
Replaces all instances of '\t' with TabWidth number of spaces
InSpacesPerTab | - Number of spaces that a tab represents |
Definition at line 1296 of file String.cpp.
|
inline |
Definition at line 2447 of file UnrealString.h.
|
inline |
Creates a const iterator for the characters in this string
Definition at line 294 of file UnrealString.h.
|
inline |
Creates an iterator for the characters in this string
Definition at line 288 of file UnrealString.h.
Takes an array of strings and removes any zero length entries.
InArray | The array to cull |
Definition at line 796 of file String.cpp.
void FString::Empty | ( | ) |
Create empty string of given size with zero terminating character
Slack | length of empty string to create |
Definition at line 321 of file String.cpp.
|
inline |
Definition at line 305 of file UnrealString.h.
|
inline |
Definition at line 306 of file UnrealString.h.
|
inline |
Test whether this string ends with given suffix.
SearchCase | Indicates whether the search is case sensitive or not ( defaults to ESearchCase::IgnoreCase ) |
Definition at line 1770 of file UnrealString.h.
|
inline |
Test whether this string ends with given suffix.
SearchCase | Indicates whether the search is case sensitive or not ( defaults to ESearchCase::IgnoreCase ) |
Definition at line 1759 of file UnrealString.h.
|
inline |
Test whether this string ends with given suffix.
SearchCase | Indicates whether the search is case sensitive or not ( defaults to ESearchCase::IgnoreCase ) |
Definition at line 1724 of file UnrealString.h.
|
inline |
Test whether this string ends with given suffix.
SearchCase | Indicates whether the search is case sensitive or not ( defaults to ESearchCase::IgnoreCase ) |
Definition at line 1747 of file UnrealString.h.
|
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 |
Definition at line 1424 of file UnrealString.h.
|
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.
SubStr | The string array of TCHAR to search for |
StartPosition | The start character position to search from. See note below. |
SearchCase | Indicates whether the search is case sensitive or not |
SearchDir | Indicates whether the search starts at the beginning or at the end. |
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.
|
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.
SubStr | The string array of TCHAR to search for |
StartPosition | The start character position to search from. See note below. |
SearchCase | Indicates whether the search is case sensitive or not |
SearchDir | Indicates whether the search starts at the beginning or at the end. |
Definition at line 1200 of file UnrealString.h.
|
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.
SubStr | The string array of TCHAR to search for |
SubStrLen | The length of the SubStr array |
StartPosition | The start character position to search from. See note below. |
SearchCase | Indicates whether the search is case sensitive or not |
SearchDir | Indicates whether the search starts at the beginning or at the end. |
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.
|
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.
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 ) |
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.
|
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 |
Definition at line 1371 of file UnrealString.h.
|
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 |
Definition at line 1383 of file UnrealString.h.
|
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. |
Definition at line 1412 of file UnrealString.h.
|
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. |
Definition at line 1397 of file UnrealString.h.
Definition at line 97 of file UnrealString.h.
|
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 |
Converts a buffer to a string
SrcBuffer | the buffer to stringify |
SrcSize | the number of bytes to convert |
Definition at line 884 of file String.cpp.
Converts a buffer to a string by hex-ifying the elements
SrcBuffer | the buffer to stringify |
SrcSize | the number of bytes to convert |
Definition at line 919 of file String.cpp.
|
inlinestatic |
Converts an integer to a string.
Definition at line 2289 of file UnrealString.h.
Create FString from Ansi std::string
Definition at line 68 of file UnrealString.h.
Create FString from UTF8 std::string
Definition at line 78 of file UnrealString.h.
|
inline |
Definition at line 308 of file UnrealString.h.
|
inline |
Get string as const array of TCHARS
Definition at line 396 of file UnrealString.h.
|
inline |
Get string as array of TCHARS
Definition at line 390 of file UnrealString.h.
Definition at line 469 of file String.cpp.
Definition at line 454 of file String.cpp.
|
inline |
Test whether this string is empty
Definition at line 337 of file UnrealString.h.
|
inline |
Returns true if the string only contains numeric characters
Definition at line 1549 of file UnrealString.h.
|
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. |
Definition at line 369 of file UnrealString.h.
|
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. |
Definition at line 2395 of file UnrealString.h.
|
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. |
Definition at line 2426 of file UnrealString.h.
|
inline |
|
inline |
Returns the left most given number of characters
Definition at line 1051 of file UnrealString.h.
|
inline |
|
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.
|
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.
|
inline |
Modifies the string such that it is now the left most given number of characters
Definition at line 1063 of file UnrealString.h.
Pad the left of this string for ChCount characters
Definition at line 1042 of file String.cpp.
|
inline |
Get the length of the string, excluding terminating character
Definition at line 1045 of file UnrealString.h.
|
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 ) |
Definition at line 1812 of file UnrealString.h.
|
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 ) |
Definition at line 1799 of file UnrealString.h.
bool FString::MatchesWildcard | ( | const TCHAR * | Wildcard, |
int32 | WildcardLen, | ||
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 ) |
Definition at line 1106 of file String.cpp.
|
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 ) |
Definition at line 1785 of file UnrealString.h.
|
inline |
|
inline |
Returns the substring from Start position to the end
Definition at line 1151 of file UnrealString.h.
|
inline |
|
inline |
Returns the substring from Start position for Count characters.
Definition at line 1131 of file UnrealString.h.
|
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.
|
inline |
Lexicographically test whether the left string is != the right string
Lhs | String to compare against. |
Rhs | String to compare against. |
Definition at line 1025 of file UnrealString.h.
|
inline |
Lexicographically test whether the left string is != the right string
Lhs | String to compare against. |
Rhs | String to compare against. |
Definition at line 1011 of file UnrealString.h.
|
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.
|
inline |
Append a single character and return a reference to this
Definition at line 481 of file UnrealString.h.
|
inline |
Append a string and return a reference to this
Definition at line 471 of file UnrealString.h.
|
inline |
Concatenate this path with given path ensuring the / character is used between them
Str | path CharRangeType (FString/FStringView/TStringBuilder etc) to be concatenated onto the end of this |
Definition at line 694 of file UnrealString.h.
|
inline |
Concatenate this path with given path ensuring the / character is used between them
Str | path array of CharType (that needs converting) to be concatenated onto the end of this |
Definition at line 707 of file UnrealString.h.
|
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 |
Definition at line 679 of file UnrealString.h.
|
inline |
Definition at line 247 of file UnrealString.h.
|
inline |
Lexicographically test whether the left string is == the right string
Lhs | String to compare against. |
Rhs | String to compare against. |
Definition at line 984 of file UnrealString.h.
|
inline |
Lexicographically test whether the left string is == the right string
Lhs | String to compare against. |
Rhs | String to compare against. |
Definition at line 970 of file UnrealString.h.
|
inline |
Return specific const character from this string
Index | into string |
Definition at line 275 of file UnrealString.h.
|
inline |
Return specific character from this string
Index | into string |
Definition at line 263 of file UnrealString.h.
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
InArray | The array to fill with the string pieces |
DelimArray | The strings to delimit on |
NumDelims | The number of delimiters. |
Definition at line 1162 of file String.cpp.
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.
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 |
Definition at line 1080 of file String.cpp.
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
InArray | The array to fill with the string pieces |
Definition at line 1147 of file String.cpp.
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 ","
InArray | The array to fill with the string pieces |
pchExtraDelim | The string to delimit on |
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.
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. |
Definition at line 630 of file String.cpp.
|
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. |
Definition at line 1570 of file UnrealString.h.
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. |
Definition at line 484 of file String.cpp.
|
inline |
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. |
Definition at line 580 of file UnrealString.h.
|
inline |
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. |
Definition at line 569 of file UnrealString.h.
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.
InSuffix | the suffix to search for at the end of the string to remove. |
InSuffixLen | length of InSuffix |
Definition at line 505 of file String.cpp.
|
inline |
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. |
Definition at line 557 of file UnrealString.h.
|
inline |
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. |
Definition at line 536 of file UnrealString.h.
|
inline |
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. |
Definition at line 525 of file UnrealString.h.
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.
InPrefix | the prefix to search for at the start of the string to remove. |
InPrefixLen | length of InPrefix |
Definition at line 489 of file String.cpp.
|
inline |
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. |
Definition at line 513 of file UnrealString.h.
void FString::RemoveSpacesInline | ( | ) |
Removes spaces from the string. I.E. "Spaces Are Cool" --> "SpacesAreCool".
Definition at line 425 of file String.cpp.
|
inline |
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 ) |
Definition at line 2047 of file UnrealString.h.
|
inline |
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 ) |
Definition at line 1996 of file UnrealString.h.
|
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 ) |
Definition at line 2141 of file UnrealString.h.
|
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. |
Definition at line 2208 of file UnrealString.h.
|
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. |
Definition at line 2193 of file UnrealString.h.
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. |
Definition at line 2180 of file UnrealString.h.
|
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().
Definition at line 2237 of file UnrealString.h.
|
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().
Definition at line 2225 of file UnrealString.h.
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.
|
inline |
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 ) |
Definition at line 2063 of file UnrealString.h.
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.
|
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.
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. |
Definition at line 347 of file UnrealString.h.
FString FString::Reverse | ( | ) | && |
Returns this string, with the characters in reverse order
Definition at line 811 of file String.cpp.
FString FString::Reverse | ( | ) | const & |
Returns a copy of this string, with the characters in reverse order
Definition at line 804 of file String.cpp.
void FString::ReverseString | ( | ) |
Reverses the order of characters in this string
Definition at line 817 of file String.cpp.
|
inline |
|
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.
|
inline |
Definition at line 1118 of file UnrealString.h.
|
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.
|
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.
|
inline |
Modifies the string such that it is now the right most given number of characters
Definition at line 1104 of file UnrealString.h.
Pad the right of this string for ChCount characters
Definition at line 1055 of file String.cpp.
|
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) |
Definition at line 964 of file String.cpp.
Serializes a string as ANSI char array.
String | String to serialize |
Ar | Archive to serialize with |
MinCharacters | Minimum number of characters to serialize. |
Definition at line 864 of file String.cpp.
void FString::Shrink | ( | ) |
Remove unallocated empty character space from the end of this string
Definition at line 327 of file String.cpp.
Split with ESearchCase::IgnoreCase and ESearchDir::FromStart. Allows compiler to avoid branches w/o inlining code.
Definition at line 414 of file String.cpp.
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.
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 ) |
Definition at line 384 of file String.cpp.
|
inline |
Test whether this string starts with given prefix.
SearchCase | Indicates whether the search is case sensitive or not ( defaults to ESearchCase::IgnoreCase ) |
Definition at line 1711 of file UnrealString.h.
|
inline |
Test whether this string starts with given prefix.
SearchCase | Indicates whether the search is case sensitive or not ( defaults to ESearchCase::IgnoreCase ) |
Definition at line 1700 of file UnrealString.h.
|
inline |
|
inline |
Test whether this string starts with given prefix.
SearchCase | Indicates whether the search is case sensitive or not ( defaults to ESearchCase::IgnoreCase ) |
Definition at line 1688 of file UnrealString.h.
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) |
Definition at line 896 of file String.cpp.
|
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
Definition at line 2330 of file UnrealString.h.
|
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) |
Definition at line 931 of file String.cpp.
|
inline |
Converts all characters in this rvalue string to lowercase and moves it into the returned string.
Definition at line 1525 of file UnrealString.h.
|
inline |
Returns a new string with the characters of this converted to lowercase
Definition at line 1514 of file UnrealString.h.
|
inline |
Converts all characters in this string to lowercase
Definition at line 1532 of file UnrealString.h.
|
inline |
Create Ansi std::string from FString
Definition at line 63 of file UnrealString.h.
|
inline |
Create UTF8 std::string from FString
Definition at line 73 of file UnrealString.h.
|
inline |
Converts all characters in this rvalue string to uppercase and moves it into the returned string.
Definition at line 1496 of file UnrealString.h.
|
inline |
Returns a new string with the characters of this converted to uppercase
Definition at line 1485 of file UnrealString.h.
|
inline |
Converts all characters in this string to uppercase
Definition at line 1503 of file UnrealString.h.
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.
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 783 of file String.cpp.
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).
Definition at line 738 of file String.cpp.
FString FString::TrimEnd | ( | ) | && |
Removes whitespace characters from the end of this string.
Definition at line 732 of file String.cpp.
FString FString::TrimEnd | ( | ) | const & |
Removes whitespace characters from the end of this string.
Definition at line 725 of file String.cpp.
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.
Returns this string with wrapping quotation marks removed.
Definition at line 777 of file String.cpp.
Returns a copy of this string with wrapping quotation marks removed.
Definition at line 770 of file String.cpp.
Trims wrapping quotation marks from this string.
Definition at line 765 of file String.cpp.
FString FString::TrimStart | ( | ) | && |
Removes whitespace characters from the start of this string.
Definition at line 709 of file String.cpp.
FString FString::TrimStart | ( | ) | const & |
Removes whitespace characters from the start of this string.
Definition at line 702 of file String.cpp.
FString FString::TrimStartAndEnd | ( | ) | && |
Removes whitespace characters from the start and end of this string.
Definition at line 686 of file String.cpp.
|
inline |
Removes whitespace characters from the start and end of this string.
Definition at line 1836 of file UnrealString.h.
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.
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.
void FString::TrimToNullTerminator | ( | ) |
Trims the inner array after the null terminator.
Definition at line 369 of file String.cpp.
|
friend |
Case insensitive string hash function.
Definition at line 2453 of file UnrealString.h.
|
friend |
Lexicographically test whether the left string is != the right string
Lhs | String to compare against. |
Rhs | String to compare against. |
Definition at line 1039 of file UnrealString.h.
|
friend |
Concatenates an FString with a TCHAR.
Lhs | The FString on the left-hand-side of the expression. |
Rhs | The char on the right-hand-side of the expression. |
Definition at line 611 of file UnrealString.h.
|
friend |
Definition at line 655 of file UnrealString.h.
|
friend |
Definition at line 661 of file UnrealString.h.
|
friend |
Definition at line 657 of file UnrealString.h.
|
friend |
Definition at line 669 of file UnrealString.h.
|
friend |
Definition at line 659 of file UnrealString.h.
|
friend |
Definition at line 660 of file UnrealString.h.
|
friend |
Concatenates an FString with a TCHAR.
Lhs | The FString on the left-hand-side of the expression. |
Rhs | The char on the right-hand-side of the expression. |
Definition at line 630 of file UnrealString.h.
|
friend |
Definition at line 656 of file UnrealString.h.
|
friend |
Definition at line 662 of file UnrealString.h.
|
friend |
Definition at line 658 of file UnrealString.h.
|
friend |
Definition at line 671 of file UnrealString.h.
|
friend |
Definition at line 665 of file UnrealString.h.
|
friend |
Definition at line 667 of file UnrealString.h.
|
friend |
Concatenate this path with given path ensuring the / character is used between them
Lhs | Path to concatenate onto. |
Rhs | Path to concatenate. |
Definition at line 757 of file UnrealString.h.
|
friend |
Concatenate this path with given path ensuring the / character is used between them
Lhs | Path to concatenate onto. |
Rhs | Path to concatenate. |
Definition at line 721 of file UnrealString.h.
|
friend |
Concatenate this path with given path ensuring the / character is used between them
Lhs | Path to concatenate onto. |
Rhs | Path to concatenate. |
Definition at line 789 of file UnrealString.h.
|
friend |
Concatenate this path with given path ensuring the / character is used between them
Lhs | Path to concatenate onto. |
Rhs | Path to concatenate. |
Definition at line 773 of file UnrealString.h.
|
friend |
Concatenate this path with given path ensuring the / character is used between them
Lhs | Path to concatenate onto. |
Rhs | Path to concatenate. |
Definition at line 739 of file UnrealString.h.
|
friend |
Lexicographically test whether the left string is < the right string
Lhs | String to compare against. |
Rhs | String to compare against. |
Definition at line 875 of file UnrealString.h.
|
friend |
Lexicographically test whether the left string is < the right string
Lhs | String to compare against. |
Rhs | String to compare against. |
Definition at line 861 of file UnrealString.h.
|
friend |
Lexicographically test whether the left string is < the right string
Lhs | String to compare against. |
Rhs | String to compare against. |
Definition at line 847 of file UnrealString.h.
Serializes the string.
Ar | Reference to the serialization archive. |
S | Reference to the string being serialized. |
Definition at line 1363 of file String.cpp.
|
friend |
Lexicographically test whether the left string is <= the right string
Lhs | String to compare against. |
Rhs | String to compare against. |
Definition at line 834 of file UnrealString.h.
|
friend |
Lexicographically test whether the left string is <= the right string
Lhs | String to compare against. |
Rhs | String to compare against. |
Definition at line 820 of file UnrealString.h.
|
friend |
Lexicographically test whether the left string is <= the right string
Lhs | String to compare against. |
Rhs | String to compare against. |
Definition at line 806 of file UnrealString.h.
|
friend |
Lexicographically test whether the left string is == the right string
Lhs | String to compare against. |
Rhs | String to compare against. |
Definition at line 998 of file UnrealString.h.
|
friend |
Lexicographically test whether the left string is > the right string
Lhs | String to compare against. |
Rhs | String to compare against. |
Definition at line 957 of file UnrealString.h.
|
friend |
Lexicographically test whether the left string is > the right string
Lhs | String to compare against. |
Rhs | String to compare against. |
Definition at line 943 of file UnrealString.h.
|
friend |
Lexicographically test whether the left string is > the right string
Lhs | String to compare against. |
Rhs | String to compare against. |
Definition at line 929 of file UnrealString.h.
|
friend |
Lexicographically test whether the left string is >= the right string
Lhs | String to compare against. |
Rhs | String to compare against. |
Definition at line 916 of file UnrealString.h.
|
friend |
Lexicographically test whether the left string is >= the right string
Lhs | String to compare against. |
Rhs | String to compare against. |
Definition at line 902 of file UnrealString.h.
|
friend |
Lexicographically test whether the left string is >= the right string
Lhs | String to compare against. |
Rhs | String to compare against. |
Definition at line 888 of file UnrealString.h.
|
private |
Definition at line 109 of file UnrealString.h.