UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FTextFormatData Class Reference

Public Member Functions

 FTextFormatData (FText &&InText, ETextFormatFlags InFormatFlags, FTextFormatPatternDefinitionConstRef InPatternDef)
 
 FTextFormatData (FString &&InString, ETextFormatFlags InFormatFlags, FTextFormatPatternDefinitionConstRef InPatternDef)
 
FORCEINLINE bool IsValid () const
 
bool IdenticalTo (const FTextFormatData &Other, const ETextIdenticalModeFlags CompareModeFlags) const
 
FORCEINLINE bool ValidatePattern (const FCulturePtr &InCulture, TArray< FString > &OutValidationErrors)
 
FORCEINLINE FString Format (const FPrivateTextFormatArguments &InFormatArgs)
 
FORCEINLINE void GetFormatArgumentNames (TArray< FString > &OutArgumentNames)
 
FORCEINLINE FText GetSourceText () const
 
FORCEINLINE const FString & GetSourceString () const
 
FORCEINLINE FTextFormat::EExpressionType GetExpressionType () const
 
FORCEINLINE ETextFormatFlags GetFormatFlags () const
 
FORCEINLINE FTextFormatPatternDefinitionConstRef GetPatternDefinition () const
 

Static Public Member Functions

static TSharedRef< FTextFormatData, ESPMode::ThreadSafeGetSharedEmptyInstance ()
 

Constructor & Destructor Documentation

◆ FTextFormatData() [1/2]

FTextFormatData::FTextFormatData ( FText &&  InText,
ETextFormatFlags  InFormatFlags,
FTextFormatPatternDefinitionConstRef  InPatternDef 
)

Construct an instance from an FText. The text will be immediately compiled.

◆ FTextFormatData() [2/2]

FTextFormatData::FTextFormatData ( FString &&  InString,
ETextFormatFlags  InFormatFlags,
FTextFormatPatternDefinitionConstRef  InPatternDef 
)

Construct an instance from an FString. The string will be immediately compiled.

Member Function Documentation

◆ Format()

FORCEINLINE FString FTextFormatData::Format ( const FPrivateTextFormatArguments InFormatArgs)
inline

Produce a formatted string using the given argument look-up.

◆ GetExpressionType()

FORCEINLINE FTextFormat::EExpressionType FTextFormatData::GetExpressionType ( ) const
inline

Get the type of expression currently compiled.

◆ GetFormatArgumentNames()

FORCEINLINE void FTextFormatData::GetFormatArgumentNames ( TArray< FString > &  OutArgumentNames)
inline

Append the names of any arguments to the given array.

◆ GetFormatFlags()

FORCEINLINE ETextFormatFlags FTextFormatData::GetFormatFlags ( ) const
inline

Get the format flags being used.

◆ GetPatternDefinition()

FORCEINLINE FTextFormatPatternDefinitionConstRef FTextFormatData::GetPatternDefinition ( ) const
inline

Get the format pattern definition being used.

◆ GetSharedEmptyInstance()

TSharedRef< FTextFormatData, ESPMode::ThreadSafe > FTextFormatData::GetSharedEmptyInstance ( )
static

Get the common "empty" instance to use for a default constructed FTextFormat.

◆ GetSourceString()

FORCEINLINE const FString & FTextFormatData::GetSourceString ( ) const
inline

Get the source string that we're holding. If we're holding a text then we'll return its internal string.

◆ GetSourceText()

FORCEINLINE FText FTextFormatData::GetSourceText ( ) const
inline

Get the source text that we're holding. If we're holding a string then we'll construct a new text.

◆ IdenticalTo()

bool FTextFormatData::IdenticalTo ( const FTextFormatData Other,
const ETextIdenticalModeFlags  CompareModeFlags 
) const

Check whether this instance is considered identical to the other instance, based on the comparison flags provided.

◆ IsValid()

FORCEINLINE bool FTextFormatData::IsValid ( ) const
inline

Test to see whether this instance contains valid compiled data.

◆ ValidatePattern()

FORCEINLINE bool FTextFormatData::ValidatePattern ( const FCulturePtr InCulture,
TArray< FString > &  OutValidationErrors 
)
inline

Validate the format pattern is valid based on the rules of the given culture (or null to use the current language).

Returns
true if the pattern is valid, or false if not (false may also fill in OutValidationErrors).

The documentation for this class was generated from the following file: