FTextFormat

Cached compiled expression used by the text formatter.

Windows
MacOS
Linux

Syntax

class FTextFormat

Remarks

Cached compiled expression used by the text formatter. The compiled expression will automatically update if the display string is changed. 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

 

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

References

Module

Core

Header

Runtime/Core/Public/Internationalization/Text.h

Welcome to the new Unreal Engine 4 Documentation site!

We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.

We'll be sure to let you know when the new system is up and running.

Post Feedback