Navigation
API > API/Runtime > API/Runtime/Core
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.
| Name | FTextFormat |
| Type | class |
| Header File | /Engine/Source/Runtime/Core/Public/Internationalization/Text.h |
| Include Path | #include "Internationalization/Text.h" |
Syntax
class FTextFormat
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FTextFormat
(
FString&& InString, |
Construct an instance from an FString. The string will be immediately compiled. | Internationalization/Text.h | |
FTextFormat
(
const FText& InText, |
Construct an instance from an FText. | Internationalization/Text.h | |
FTextFormat () |
Construct an instance using an empty FText. | Internationalization/Text.h | |
FTextFormat
(
const FText& InText, |
Construct an instance from an FText and custom format pattern definition. | Internationalization/Text.h |
Enums
Public
| Name | Remarks |
|---|---|
| EExpressionType |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| TextFormatData | TSharedRef< FTextFormatData, ESPMode::ThreadSafe > | Cached compiled expression data | Internationalization/Text.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
EExpressionType GetExpressionType() |
Get the type of expression currently compiled. | Internationalization/Text.h | |
void GetFormatArgumentNames
(
TArray< FString >& OutArgumentNames |
Append the names of any arguments to the given array. | Internationalization/Text.h | |
ETextFormatFlags GetFormatFlags() |
Get the format flags being used. | Internationalization/Text.h | |
FTextFormatPatternDefinitionConstRef GetPatternDefinition() |
Get the format pattern definition being used. | Internationalization/Text.h | |
const FString & GetSourceString () |
Get the source string that we're holding. | Internationalization/Text.h | |
FText GetSourceText() |
Get the source text that we're holding. If we're holding a string then we'll construct a new text. | Internationalization/Text.h | |
bool IdenticalTo
(
const FTextFormat& Other, |
Check whether this instance is considered identical to the other instance, based on the comparison flags provided. | Internationalization/Text.h | |
bool IsValid() |
Test to see whether this instance contains valid compiled data. | Internationalization/Text.h | |
bool ValidatePattern
(
const FCulturePtr& InCulture, |
Validate the format pattern is valid based on the rules of the given culture (or null to use the current language). | Internationalization/Text.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static FTextFormat FromString
(
FString&& InString, |
Internationalization/Text.h | ||
static FTextFormat FromString
(
const FString& InString, |
Construct an instance from an FString and custom format pattern definition. | Internationalization/Text.h | |
static FTextFormat FromString
(
FString&& InString, |
Internationalization/Text.h | ||
static FTextFormat FromString
(
const FString& InString, |
Construct an instance from an FString. The string will be immediately compiled. | Internationalization/Text.h |