![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <Text.h>
Public Types | |
| enum class | EExpressionType { Invalid , Simple , Complex } |
Public Member Functions | |
| CORE_API | FTextFormat () |
| CORE_API | FTextFormat (const FText &InText, ETextFormatFlags InFormatFlags=ETextFormatFlags::Default) |
| CORE_API | FTextFormat (const FText &InText, FTextFormatPatternDefinitionConstRef InCustomPatternDef, ETextFormatFlags InFormatFlags=ETextFormatFlags::Default) |
| CORE_API bool | IsValid () const |
| CORE_API bool | IdenticalTo (const FTextFormat &Other, const ETextIdenticalModeFlags CompareModeFlags) const |
| CORE_API FText | GetSourceText () const |
| CORE_API const FString & | GetSourceString () const |
| CORE_API EExpressionType | GetExpressionType () const |
| CORE_API ETextFormatFlags | GetFormatFlags () const |
| CORE_API FTextFormatPatternDefinitionConstRef | GetPatternDefinition () const |
| CORE_API bool | ValidatePattern (const FCulturePtr &InCulture, TArray< FString > &OutValidationErrors) const |
| CORE_API void | GetFormatArgumentNames (TArray< FString > &OutArgumentNames) const |
Static Public Member Functions | |
| static CORE_API FTextFormat | FromString (const FString &InString, ETextFormatFlags InFormatFlags=ETextFormatFlags::Default) |
| static CORE_API FTextFormat | FromString (FString &&InString, ETextFormatFlags InFormatFlags=ETextFormatFlags::Default) |
| static CORE_API FTextFormat | FromString (const FString &InString, FTextFormatPatternDefinitionConstRef InCustomPatternDef, ETextFormatFlags InFormatFlags=ETextFormatFlags::Default) |
| static CORE_API FTextFormat | FromString (FString &&InString, FTextFormatPatternDefinitionConstRef InCustomPatternDef, ETextFormatFlags InFormatFlags=ETextFormatFlags::Default) |
Friends | |
| class | FTextFormatter |
Cached compiled expression used by the text formatter. The compiled expression will automatically update if the display string is changed, and is safe to be used as a function-level static. See TextFormatter.cpp for the definition.
|
strong |
| FTextFormat::FTextFormat | ( | ) |
Construct an instance using an empty FText.
| FTextFormat::FTextFormat | ( | const FText & | InText, |
| ETextFormatFlags | InFormatFlags = ETextFormatFlags::Default |
||
| ) |
Construct an instance from an FText. The text will be immediately compiled.
| FTextFormat::FTextFormat | ( | const FText & | InText, |
| FTextFormatPatternDefinitionConstRef | InCustomPatternDef, | ||
| ETextFormatFlags | InFormatFlags = ETextFormatFlags::Default |
||
| ) |
Construct an instance from an FText and custom format pattern definition. The text will be immediately compiled.
|
static |
Construct an instance from an FString. The string will be immediately compiled.
|
static |
Construct an instance from an FString and custom format pattern definition. The string will be immediately compiled.
|
static |
|
static |
| FTextFormat::EExpressionType FTextFormat::GetExpressionType | ( | ) | const |
Get the type of expression currently compiled.
Append the names of any arguments to the given array.
| ETextFormatFlags FTextFormat::GetFormatFlags | ( | ) | const |
Get the format flags being used.
| FTextFormatPatternDefinitionConstRef FTextFormat::GetPatternDefinition | ( | ) | const |
Get the format pattern definition being used.
| const FString & FTextFormat::GetSourceString | ( | ) | const |
Get the source string that we're holding. If we're holding a text then we'll return its internal string.
| FText FTextFormat::GetSourceText | ( | ) | const |
Get the source text that we're holding. If we're holding a string then we'll construct a new text.
| bool FTextFormat::IdenticalTo | ( | const FTextFormat & | Other, |
| const ETextIdenticalModeFlags | CompareModeFlags | ||
| ) | const |
Check whether this instance is considered identical to the other instance, based on the comparison flags provided.
| bool FTextFormat::ValidatePattern | ( | const FCulturePtr & | InCulture, |
| TArray< FString > & | OutValidationErrors | ||
| ) | const |
Validate the format pattern is valid based on the rules of the given culture (or null to use the current language).
|
friend |