FTextFormat

Cached compiled expression used by the text formatter.

References

Module

Core

Header

/Engine/Source/Runtime/Core/Public/Internationalization/Text.h

Include

#include "Internationalization/Text.h"

Syntax

class FTextFormat

Remarks

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.

Constructors

Name Description

Public function

FTextFormat()

Construct an instance using an empty FText.

Public function

FTextFormat

(
    const FText& InText
)

Construct an instance from an FText.

Public function

FTextFormat

(
    const FText& InText,
    FTextFormatPatternDefinitionConstRe...
)

Construct an instance from an FText and custom format pattern definition.

Functions

Name Description

Public function Static

FTextFormat

 

FromString

(
    const FString& InString
)

Construct an instance from an FString.

Public function Static

FTextFormat

 

FromString

(
    FString&& InString
)

Construct an instance from an FString.

Public function Static

FTextFormat

 

FromString

(
    const FString& InString,
    FTextFormatPatternDefinitionConstRe...
)

Construct an instance from an FString and custom format pattern definition.

Public function Static

FTextFormat

 

FromString

(
    FString&& InString,
    FTextFormatPatternDefinitionConstRe...
)

Construct an instance from an FString.

Public function Const

EExpressionT...

 

GetExpressionType()

Get the type of expression currently compiled.

Public function Const

void

 

GetFormatArgumentNames

(
    TArray< FString >& OutArgumentName...
)

Append the names of any arguments to the given array.

Public function Const

FTextFormatP...

 

GetPatternDefinition()

Get the format pattern definition being used.

Public function Const

const FStrin...

 

GetSourceString()

Get the source string that we're holding.

Public function Const

FText

 

GetSourceText()

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

Public function Const

bool

 

IdenticalTo

(
    const FTextFormat& Other,
    const ETextIdenticalModeFlags Compa...
)

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

Public function Const

bool

 

IsValid()

Test to see whether this instance contains valid compiled data.

Public function Const

bool

 

ValidatePattern

(
    const FCulturePtr& InCulture,
    TArray< FString >& OutValidationEr...
)

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

Enums

Name

Description

Public enum

EExpressionType

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Cancel