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

#include <Text.h>

Classes

class  FSortPredicate
 

Public Types

using IntrusiveUnsetOptionalStateType = FText
 

Public Member Functions

CORE_API FText ()
 
 FText (const FText &)=default
 
FTextoperator= (const FText &)=default
 
CORE_API FText (FText &&Other)
 
CORE_API FTextoperator= (FText &&Other)
 
CORE_API const FString & ToString () const
 
CORE_API FString BuildSourceString () const
 
CORE_API bool IsNumeric () const
 
CORE_API int32 CompareTo (const FText &Other, const ETextComparisonLevel::Type ComparisonLevel=ETextComparisonLevel::Default) const
 
CORE_API int32 CompareToCaseIgnored (const FText &Other) const
 
CORE_API bool EqualTo (const FText &Other, const ETextComparisonLevel::Type ComparisonLevel=ETextComparisonLevel::Default) const
 
CORE_API bool EqualToCaseIgnored (const FText &Other) const
 
CORE_API bool IdenticalTo (const FText &Other, const ETextIdenticalModeFlags CompareModeFlags=ETextIdenticalModeFlags::None) const
 
CORE_API bool IsEmpty () const
 
CORE_API bool IsEmptyOrWhitespace () const
 
CORE_API FText ToLower () const
 
CORE_API FText ToUpper () const
 
 DECLARE_DELEGATE_RetVal_OneParam (TSharedRef< ITextGenerator >, FCreateTextGeneratorDelegate, FStructuredArchive::FRecord)
 
CORE_API bool IsTransient () const
 
CORE_API bool IsCultureInvariant () const
 
CORE_API bool IsInitializedFromString () const
 
CORE_API bool IsFromStringTable () const
 
CORE_API bool ShouldGatherForLocalization () const
 
 FText (FIntrusiveUnsetOptionalState)
 
bool operator== (FIntrusiveUnsetOptionalState) const
 

Static Public Member Functions

static CORE_API const FTextGetEmpty ()
 
static CORE_API void AutoRTFMAssignFromOpenToClosed (FText &Closed, const FText &Open)
 
static CORE_API FText AsNumber (float Val, const FNumberFormattingOptions *const Options=NULL, const FCulturePtr &TargetCulture=NULL)
 
static CORE_API FText AsNumber (double Val, const FNumberFormattingOptions *const Options=NULL, const FCulturePtr &TargetCulture=NULL)
 
static CORE_API FText AsNumber (int8 Val, const FNumberFormattingOptions *const Options=NULL, const FCulturePtr &TargetCulture=NULL)
 
static CORE_API FText AsNumber (int16 Val, const FNumberFormattingOptions *const Options=NULL, const FCulturePtr &TargetCulture=NULL)
 
static CORE_API FText AsNumber (int32 Val, const FNumberFormattingOptions *const Options=NULL, const FCulturePtr &TargetCulture=NULL)
 
static CORE_API FText AsNumber (int64 Val, const FNumberFormattingOptions *const Options=NULL, const FCulturePtr &TargetCulture=NULL)
 
static CORE_API FText AsNumber (uint8 Val, const FNumberFormattingOptions *const Options=NULL, const FCulturePtr &TargetCulture=NULL)
 
static CORE_API FText AsNumber (uint16 Val, const FNumberFormattingOptions *const Options=NULL, const FCulturePtr &TargetCulture=NULL)
 
static CORE_API FText AsNumber (uint32 Val, const FNumberFormattingOptions *const Options=NULL, const FCulturePtr &TargetCulture=NULL)
 
static CORE_API FText AsNumber (uint64 Val, const FNumberFormattingOptions *const Options=NULL, const FCulturePtr &TargetCulture=NULL)
 
static CORE_API FText AsNumber (long Val, const FNumberFormattingOptions *const Options=NULL, const FCulturePtr &TargetCulture=NULL)
 
static CORE_API FText AsCurrency (float Val, const FString &CurrencyCode=FString(), const FNumberFormattingOptions *const Options=NULL, const FCulturePtr &TargetCulture=NULL)
 
static CORE_API FText AsCurrency (double Val, const FString &CurrencyCode=FString(), const FNumberFormattingOptions *const Options=NULL, const FCulturePtr &TargetCulture=NULL)
 
static CORE_API FText AsCurrency (int8 Val, const FString &CurrencyCode=FString(), const FNumberFormattingOptions *const Options=NULL, const FCulturePtr &TargetCulture=NULL)
 
static CORE_API FText AsCurrency (int16 Val, const FString &CurrencyCode=FString(), const FNumberFormattingOptions *const Options=NULL, const FCulturePtr &TargetCulture=NULL)
 
static CORE_API FText AsCurrency (int32 Val, const FString &CurrencyCode=FString(), const FNumberFormattingOptions *const Options=NULL, const FCulturePtr &TargetCulture=NULL)
 
static CORE_API FText AsCurrency (int64 Val, const FString &CurrencyCode=FString(), const FNumberFormattingOptions *const Options=NULL, const FCulturePtr &TargetCulture=NULL)
 
static CORE_API FText AsCurrency (uint8 Val, const FString &CurrencyCode=FString(), const FNumberFormattingOptions *const Options=NULL, const FCulturePtr &TargetCulture=NULL)
 
static CORE_API FText AsCurrency (uint16 Val, const FString &CurrencyCode=FString(), const FNumberFormattingOptions *const Options=NULL, const FCulturePtr &TargetCulture=NULL)
 
static CORE_API FText AsCurrency (uint32 Val, const FString &CurrencyCode=FString(), const FNumberFormattingOptions *const Options=NULL, const FCulturePtr &TargetCulture=NULL)
 
static CORE_API FText AsCurrency (uint64 Val, const FString &CurrencyCode=FString(), const FNumberFormattingOptions *const Options=NULL, const FCulturePtr &TargetCulture=NULL)
 
static CORE_API FText AsCurrency (long Val, const FString &CurrencyCode=FString(), const FNumberFormattingOptions *const Options=NULL, const FCulturePtr &TargetCulture=NULL)
 
static CORE_API FText AsCurrencyBase (int64 BaseVal, const FString &CurrencyCode, const FCulturePtr &TargetCulture=NULL, int32 ForceDecimalPlaces=-1)
 
static CORE_API FText AsPercent (float Val, const FNumberFormattingOptions *const Options=NULL, const FCulturePtr &TargetCulture=NULL)
 
static CORE_API FText AsPercent (double Val, const FNumberFormattingOptions *const Options=NULL, const FCulturePtr &TargetCulture=NULL)
 
static CORE_API FText AsDate (const FDateTime &DateTime, const EDateTimeStyle::Type DateStyle=EDateTimeStyle::Default, const FString &TimeZone=FString(), const FCulturePtr &TargetCulture=NULL)
 
static CORE_API FText AsDateTime (const FDateTime &DateTime, const EDateTimeStyle::Type DateStyle=EDateTimeStyle::Default, const EDateTimeStyle::Type TimeStyle=EDateTimeStyle::Default, const FString &TimeZone=FString(), const FCulturePtr &TargetCulture=NULL)
 
static CORE_API FText AsDateTime (const FDateTime &DateTime, const FString &CustomPattern, const FString &TimeZone=FString(), const FCulturePtr &TargetCulture=NULL)
 
static CORE_API FText AsTime (const FDateTime &DateTime, const EDateTimeStyle::Type TimeStyle=EDateTimeStyle::Default, const FString &TimeZone=FString(), const FCulturePtr &TargetCulture=NULL)
 
static CORE_API FText AsTimespan (const FTimespan &Timespan, const FCulturePtr &TargetCulture=NULL)
 
static CORE_API FString GetInvariantTimeZone ()
 
static CORE_API FText AsMemory (uint64 NumBytes, const FNumberFormattingOptions *const Options=NULL, const FCulturePtr &TargetCulture=NULL, EMemoryUnitStandard UnitStandard=EMemoryUnitStandard::IEC)
 
static CORE_API FText AsMemory (uint64 NumBytes, EMemoryUnitStandard UnitStandard)
 
static CORE_API FText FromStringTable (const FName InTableId, const FTextKey &InKey, const EStringTableLoadingPolicy InLoadingPolicy=EStringTableLoadingPolicy::FindOrLoad)
 
static CORE_API FText FromName (const FName &Val)
 
static CORE_API FText FromString (const ANSICHAR *String)
 
static CORE_API FText FromString (const UTF8CHAR *String)
 
static CORE_API FText FromString (const WIDECHAR *String)
 
static CORE_API FText FromString (const FAnsiString &String)
 
static CORE_API FText FromString (const FString &String)
 
static CORE_API FText FromString (FString &&String)
 
static CORE_API FText FromString (const FUtf8String &String)
 
static CORE_API FText FromStringView (FAnsiStringView InString)
 
static CORE_API FText FromStringView (FUtf8StringView InString)
 
static CORE_API FText FromStringView (FWideStringView InString)
 
static CORE_API FText AsCultureInvariant (const ANSICHAR *String)
 
static CORE_API FText AsCultureInvariant (const UTF8CHAR *String)
 
static CORE_API FText AsCultureInvariant (const WIDECHAR *String)
 
static CORE_API FText AsCultureInvariant (FAnsiStringView String)
 
static CORE_API FText AsCultureInvariant (FUtf8StringView String)
 
static CORE_API FText AsCultureInvariant (FWideStringView String)
 
static CORE_API FText AsCultureInvariant (FString &&String)
 
static CORE_API FText AsCultureInvariant (FText Text)
 
static CORE_API FText AsLocalizable_Advanced (const FTextKey &Namespace, const FTextKey &Key, const TCHAR *String)
 
static CORE_API FText AsLocalizable_Advanced (const FTextKey &Namespace, const FTextKey &Key, FStringView String)
 
static CORE_API FText AsLocalizable_Advanced (const FTextKey &Namespace, const FTextKey &Key, FString &&String)
 
static CORE_API FText AsLocalizable_Advanced_LocText (const TCHAR *Namespace, const TCHAR *Key, const TCHAR *String)
 
static CORE_API bool FindTextInLiveTable_Advanced (const FTextKey &Namespace, const FTextKey &Key, FText &OutText, const FString *const SourceString=nullptr)
 
static UE_FORCEINLINE_HINT bool FindText (const FTextKey &Namespace, const FTextKey &Key, FText &OutText, const FString *const SourceString=nullptr)
 
static CORE_API FText TrimPreceding (const FText &)
 
static CORE_API FText TrimTrailing (const FText &)
 
static CORE_API FText TrimPrecedingAndTrailing (const FText &)
 
static CORE_API bool IsWhitespace (const TCHAR Char)
 
static CORE_API void GetFormatPatternParameters (const FTextFormat &Fmt, TArray< FString > &ParameterNames)
 
static CORE_API FText Format (FTextFormat Fmt, const FFormatNamedArguments &InArguments)
 
static CORE_API FText Format (FTextFormat Fmt, FFormatNamedArguments &&InArguments)
 
static CORE_API FText Format (FTextFormat Fmt, const FFormatOrderedArguments &InArguments)
 
static CORE_API FText Format (FTextFormat Fmt, FFormatOrderedArguments &&InArguments)
 
template<typename... ArgTypes>
static FText Format (FTextFormat Fmt, ArgTypes... Args)
 
template<typename... TArguments>
static FText FormatNamed (FTextFormat Fmt, TArguments &&... Args)
 
template<typename... TArguments>
static FText FormatOrdered (FTextFormat Fmt, TArguments &&... Args)
 
static CORE_API FText Join (const FText &Delimiter, const FFormatOrderedArguments &Args)
 
static CORE_API FText Join (const FText &Delimiter, const TArray< FText > &Args)
 
template<typename... ArgTypes>
static FText Join (const FText &Delimiter, ArgTypes... Args)
 
static CORE_API FText FromTextGenerator (const TSharedRef< ITextGenerator > &TextGenerator)
 
static CORE_API FCreateTextGeneratorDelegate FindRegisteredTextGenerator (FName TypeID)
 
static CORE_API void RegisterTextGenerator (FName TypeID, FCreateTextGeneratorDelegate FactoryFunction)
 
template<typename T >
static void RegisterTextGenerator (FName TypeID)
 
template<typename T >
static void RegisterTextGenerator ()
 
static CORE_API void UnregisterTextGenerator (FName TypeID)
 
template<typename T >
static void UnregisterTextGenerator ()
 
static CORE_API void PreloadStringTable (FName InTableId, const FTextKey &InKey)
 

Static Public Attributes

static constexpr bool bHasIntrusiveUnsetOptionalState = true
 

Friends

class FTextCache
 
class FTextFormatter
 
class FTextFormatData
 
class FTextSnapshot
 
class FTextInspector
 
class FTextStringHelper
 
class FStringTableRegistry
 
class FArchive
 
class FArchiveFromStructuredArchiveImpl
 
class FJsonArchiveInputFormatter
 
class FJsonArchiveOutputFormatter
 
class FTextProperty
 
class FFormatArgumentValue
 
class FTextHistory_NamedFormat
 
class FTextHistory_ArgumentDataFormat
 
class FTextHistory_OrderedFormat
 
class FTextHistory_Transform
 
class FScopedTextIdentityPreserver
 

Detailed Description

Member Typedef Documentation

◆ IntrusiveUnsetOptionalStateType

Constructor & Destructor Documentation

◆ FText() [1/4]

FText::FText ( )

◆ FText() [2/4]

FText::FText ( const FText )
default

◆ FText() [3/4]

FText::FText ( FText &&  Other)

◆ FText() [4/4]

FText::FText ( FIntrusiveUnsetOptionalState  )
inlineexplicit

Member Function Documentation

◆ AsCultureInvariant() [1/8]

FText FText::AsCultureInvariant ( const ANSICHAR String)
static

Generate a culture invariant FText representing the passed in string

◆ AsCultureInvariant() [2/8]

FText FText::AsCultureInvariant ( const UTF8CHAR String)
static

◆ AsCultureInvariant() [3/8]

FText FText::AsCultureInvariant ( const WIDECHAR String)
static

◆ AsCultureInvariant() [4/8]

FText FText::AsCultureInvariant ( FAnsiStringView  String)
static

◆ AsCultureInvariant() [5/8]

FText FText::AsCultureInvariant ( FString &&  String)
static

◆ AsCultureInvariant() [6/8]

FText FText::AsCultureInvariant ( FText  Text)
static

Generate a culture invariant FText representing the passed in FText

◆ AsCultureInvariant() [7/8]

FText FText::AsCultureInvariant ( FUtf8StringView  String)
static

◆ AsCultureInvariant() [8/8]

FText FText::AsCultureInvariant ( FWideStringView  String)
static

◆ AsCurrency() [1/11]

static CORE_API FText FText::AsCurrency ( double  Val,
const FString &  CurrencyCode = FString(),
const FNumberFormattingOptions *const  Options = NULL,
const FCulturePtr TargetCulture = NULL 
)
static

◆ AsCurrency() [2/11]

static CORE_API FText FText::AsCurrency ( float  Val,
const FString &  CurrencyCode = FString(),
const FNumberFormattingOptions *const  Options = NULL,
const FCulturePtr TargetCulture = NULL 
)
static

◆ AsCurrency() [3/11]

static CORE_API FText FText::AsCurrency ( int16  Val,
const FString &  CurrencyCode = FString(),
const FNumberFormattingOptions *const  Options = NULL,
const FCulturePtr TargetCulture = NULL 
)
static

◆ AsCurrency() [4/11]

static CORE_API FText FText::AsCurrency ( int32  Val,
const FString &  CurrencyCode = FString(),
const FNumberFormattingOptions *const  Options = NULL,
const FCulturePtr TargetCulture = NULL 
)
static

◆ AsCurrency() [5/11]

static CORE_API FText FText::AsCurrency ( int64  Val,
const FString &  CurrencyCode = FString(),
const FNumberFormattingOptions *const  Options = NULL,
const FCulturePtr TargetCulture = NULL 
)
static

◆ AsCurrency() [6/11]

static CORE_API FText FText::AsCurrency ( int8  Val,
const FString &  CurrencyCode = FString(),
const FNumberFormattingOptions *const  Options = NULL,
const FCulturePtr TargetCulture = NULL 
)
static

◆ AsCurrency() [7/11]

static CORE_API FText FText::AsCurrency ( long  Val,
const FString &  CurrencyCode = FString(),
const FNumberFormattingOptions *const  Options = NULL,
const FCulturePtr TargetCulture = NULL 
)
static

◆ AsCurrency() [8/11]

static CORE_API FText FText::AsCurrency ( uint16  Val,
const FString &  CurrencyCode = FString(),
const FNumberFormattingOptions *const  Options = NULL,
const FCulturePtr TargetCulture = NULL 
)
static

◆ AsCurrency() [9/11]

static CORE_API FText FText::AsCurrency ( uint32  Val,
const FString &  CurrencyCode = FString(),
const FNumberFormattingOptions *const  Options = NULL,
const FCulturePtr TargetCulture = NULL 
)
static

◆ AsCurrency() [10/11]

static CORE_API FText FText::AsCurrency ( uint64  Val,
const FString &  CurrencyCode = FString(),
const FNumberFormattingOptions *const  Options = NULL,
const FCulturePtr TargetCulture = NULL 
)
static

◆ AsCurrency() [11/11]

static CORE_API FText FText::AsCurrency ( uint8  Val,
const FString &  CurrencyCode = FString(),
const FNumberFormattingOptions *const  Options = NULL,
const FCulturePtr TargetCulture = NULL 
)
static

◆ AsCurrencyBase()

FText FText::AsCurrencyBase ( int64  BaseVal,
const FString &  CurrencyCode,
const FCulturePtr TargetCulture = NULL,
int32  ForceDecimalPlaces = -1 
)
static

Generate an FText that represents the passed number as currency in the current culture. BaseVal is specified in the smallest fractional value of the currency and will be converted for formatting according to the selected culture. Keep in mind the CurrencyCode is completely independent of the culture it's displayed in (and they do not imply one another). For example: FText::AsCurrencyBase(650, TEXT("EUR")); would return an FText of "<EUR>6.50" in most English cultures (en_US/en_UK) and "6,50<EUR>" in Spanish (es_ES) (where <EUR> is U+20AC)

◆ AsDate()

FText FText::AsDate ( const FDateTime DateTime,
const EDateTimeStyle::Type  DateStyle = EDateTimeStyle::Default,
const FString &  TimeZone = FString(),
const FCulturePtr TargetCulture = NULL 
)
static

Generate an FText that represents the given timestamp as a date/time in the current culture using the given timezone (default is the local timezone).

This function will convert the given timestamp from UTC (eg, FDateTime::UtcNow()) to the given timezone (taking into account DST). If using a local timestamp (eg, FDateTime::Now()) then you MUST use FText::GetInvariantTimeZone() as the TimeZone argument to avoid additional timezone conversion.

Note
The overload using a custom pattern uses strftime-like syntax (see FDateTime::ToFormattedString).

◆ AsDateTime() [1/2]

FText FText::AsDateTime ( const FDateTime DateTime,
const EDateTimeStyle::Type  DateStyle = EDateTimeStyle::Default,
const EDateTimeStyle::Type  TimeStyle = EDateTimeStyle::Default,
const FString &  TimeZone = FString(),
const FCulturePtr TargetCulture = NULL 
)
static

◆ AsDateTime() [2/2]

FText FText::AsDateTime ( const FDateTime DateTime,
const FString &  CustomPattern,
const FString &  TimeZone = FString(),
const FCulturePtr TargetCulture = NULL 
)
static

◆ AsLocalizable_Advanced() [1/3]

FText FText::AsLocalizable_Advanced ( const FTextKey Namespace,
const FTextKey Key,
const TCHAR String 
)
static

=== !! This is an ADVANCED function. USE WITH CAUTION !! ===

Generate a localizable FText for the given ID and source string, either to create a NEW localizable FText, or to dynamically reference an EXISTING FText.

When using it to create a NEW localizable FText (eg, when editing an asset), YOU are responsible for ensuring that the resultant FText is gathered for localization (eg, by assigning it to a FText property or via a CUSTOM gather handler). Note: DO NOT use this as a general replacement for the LOCTEXT macro in C++!

When using it to dynamically reference an EXISTING FText (such as known LOCTEXT in code) it can be thought of as an alternative to FText::FindTextInLiveTable_Advanced that also handles untranslated text. Note: Direct dynamic references to FText are EXTREMELY FRAGILE, and you may want to use a string table instead!

◆ AsLocalizable_Advanced() [2/3]

FText FText::AsLocalizable_Advanced ( const FTextKey Namespace,
const FTextKey Key,
FString &&  String 
)
static

◆ AsLocalizable_Advanced() [3/3]

FText FText::AsLocalizable_Advanced ( const FTextKey Namespace,
const FTextKey Key,
FStringView  String 
)
static

◆ AsLocalizable_Advanced_LocText()

FText FText::AsLocalizable_Advanced_LocText ( const TCHAR Namespace,
const TCHAR Key,
const TCHAR String 
)
static

◆ AsMemory() [1/2]

FText FText::AsMemory ( uint64  NumBytes,
const FNumberFormattingOptions *const  Options = NULL,
const FCulturePtr TargetCulture = NULL,
EMemoryUnitStandard  UnitStandard = EMemoryUnitStandard::IEC 
)
static

Generate an FText that represents the passed number as a memory size in the current culture

◆ AsMemory() [2/2]

FText FText::AsMemory ( uint64  NumBytes,
EMemoryUnitStandard  UnitStandard 
)
static

Generate an FText that represents the passed number as a memory size in the current culture

◆ AsNumber() [1/11]

static CORE_API FText FText::AsNumber ( double  Val,
const FNumberFormattingOptions *const  Options = NULL,
const FCulturePtr TargetCulture = NULL 
)
static

◆ AsNumber() [2/11]

static CORE_API FText FText::AsNumber ( float  Val,
const FNumberFormattingOptions *const  Options = NULL,
const FCulturePtr TargetCulture = NULL 
)
static

Generate an FText that represents the passed number in the current culture

◆ AsNumber() [3/11]

static CORE_API FText FText::AsNumber ( int16  Val,
const FNumberFormattingOptions *const  Options = NULL,
const FCulturePtr TargetCulture = NULL 
)
static

◆ AsNumber() [4/11]

static CORE_API FText FText::AsNumber ( int32  Val,
const FNumberFormattingOptions *const  Options = NULL,
const FCulturePtr TargetCulture = NULL 
)
static

◆ AsNumber() [5/11]

static CORE_API FText FText::AsNumber ( int64  Val,
const FNumberFormattingOptions *const  Options = NULL,
const FCulturePtr TargetCulture = NULL 
)
static

◆ AsNumber() [6/11]

static CORE_API FText FText::AsNumber ( int8  Val,
const FNumberFormattingOptions *const  Options = NULL,
const FCulturePtr TargetCulture = NULL 
)
static

◆ AsNumber() [7/11]

static CORE_API FText FText::AsNumber ( long  Val,
const FNumberFormattingOptions *const  Options = NULL,
const FCulturePtr TargetCulture = NULL 
)
static

◆ AsNumber() [8/11]

static CORE_API FText FText::AsNumber ( uint16  Val,
const FNumberFormattingOptions *const  Options = NULL,
const FCulturePtr TargetCulture = NULL 
)
static

◆ AsNumber() [9/11]

static CORE_API FText FText::AsNumber ( uint32  Val,
const FNumberFormattingOptions *const  Options = NULL,
const FCulturePtr TargetCulture = NULL 
)
static

◆ AsNumber() [10/11]

static CORE_API FText FText::AsNumber ( uint64  Val,
const FNumberFormattingOptions *const  Options = NULL,
const FCulturePtr TargetCulture = NULL 
)
static

◆ AsNumber() [11/11]

static CORE_API FText FText::AsNumber ( uint8  Val,
const FNumberFormattingOptions *const  Options = NULL,
const FCulturePtr TargetCulture = NULL 
)
static

◆ AsPercent() [1/2]

static CORE_API FText FText::AsPercent ( double  Val,
const FNumberFormattingOptions *const  Options = NULL,
const FCulturePtr TargetCulture = NULL 
)
static

◆ AsPercent() [2/2]

static CORE_API FText FText::AsPercent ( float  Val,
const FNumberFormattingOptions *const  Options = NULL,
const FCulturePtr TargetCulture = NULL 
)
static

Generate an FText that represents the passed number as a percentage in the current culture

◆ AsTime()

FText FText::AsTime ( const FDateTime DateTime,
const EDateTimeStyle::Type  TimeStyle = EDateTimeStyle::Default,
const FString &  TimeZone = FString(),
const FCulturePtr TargetCulture = NULL 
)
static

◆ AsTimespan()

FText FText::AsTimespan ( const FTimespan Timespan,
const FCulturePtr TargetCulture = NULL 
)
static

Generate an FText that represents the given timespan in the current culture, as a delta-time representation (eg, {Hours}:{Minutes}:{Seconds} or {Minutes}:{Seconds}).

◆ AutoRTFMAssignFromOpenToClosed()

void FText::AutoRTFMAssignFromOpenToClosed ( FText Closed,
const FText Open 
)
static

◆ BuildSourceString()

FString FText::BuildSourceString ( ) const

Deep build of the source string for this FText, climbing the history hierarchy

◆ CompareTo()

int32 FText::CompareTo ( const FText Other,
const ETextComparisonLevel::Type  ComparisonLevel = ETextComparisonLevel::Default 
) const

◆ CompareToCaseIgnored()

int32 FText::CompareToCaseIgnored ( const FText Other) const

◆ DECLARE_DELEGATE_RetVal_OneParam()

FText::DECLARE_DELEGATE_RetVal_OneParam ( TSharedRef< ITextGenerator ,
FCreateTextGeneratorDelegate  ,
FStructuredArchive::FRecord   
)

◆ EqualTo()

bool FText::EqualTo ( const FText Other,
const ETextComparisonLevel::Type  ComparisonLevel = ETextComparisonLevel::Default 
) const

◆ EqualToCaseIgnored()

bool FText::EqualToCaseIgnored ( const FText Other) const

◆ FindRegisteredTextGenerator()

FText::FCreateTextGeneratorDelegate FText::FindRegisteredTextGenerator ( FName  TypeID)
static

Returns the text generator factory function registered under the specified name, if any.

Parameters
TypeIDthe name under which to look up the factory function

◆ FindText()

static UE_FORCEINLINE_HINT bool FText::FindText ( const FTextKey Namespace,
const FTextKey Key,
FText OutText,
const FString *const  SourceString = nullptr 
)
inlinestatic

◆ FindTextInLiveTable_Advanced()

bool FText::FindTextInLiveTable_Advanced ( const FTextKey Namespace,
const FTextKey Key,
FText OutText,
const FString *const  SourceString = nullptr 
)
static

=== !! This is an ADVANCED function. USE WITH CAUTION !! ===

Attempt to dynamically reference an EXISTING FText via its active display string in the live table. Note: This can ONLY find text that is currently localized (gathered, translated, and has an active display string in FTextLocalizationManager). If you need to find a localizable but untranslated text, see FText::AsLocalizable_Advanced. Note: Direct dynamic references to FText are EXTREMELY FRAGILE, and you may want to use a string table instead!

Parameters
NamespaceThe namespace of the text to find (if any).
KeyThe key of the text to find.
SourceStringIf set (not empty) then the found text must also have been created from this source string.
Returns
true if OutText was set; otherwise false and OutText will be unmodified

◆ Format() [1/5]

template<typename... ArgTypes>
static FText FText::Format ( FTextFormat  Fmt,
ArgTypes...  Args 
)
inlinestatic

Format the given list of variadic values as ordered arguments within the given format pattern

Note
You may want to pre-compile your FText pattern into a FTextFormat prior to performing formats within a loop or on a critical path, as this can save CPU cycles, memory, and mutex resources vs re-compiling the pattern for each format call. See FTextFormat for more info.

@usage FText::Format(LOCTEXT("PlayerNameFmt", "{0} is really cool"), FText::FromString(PlayerName));

Parameters
FmtThe format pattern to use
ArgsA variadic list of values to inject into the format pattern
Returns
The formatted FText

◆ Format() [2/5]

FText FText::Format ( FTextFormat  Fmt,
const FFormatNamedArguments InArguments 
)
static

Format the given map of key->value pairs as named arguments within the given format pattern

Note
You may want to pre-compile your FText pattern into a FTextFormat prior to performing formats within a loop or on a critical path, as this can save CPU cycles, memory, and mutex resources vs re-compiling the pattern for each format call. See FTextFormat for more info.
Parameters
FmtThe format pattern to use
InArgumentsThe map of key->value pairs to inject into the format pattern
Returns
The formatted FText

◆ Format() [3/5]

FText FText::Format ( FTextFormat  Fmt,
const FFormatOrderedArguments InArguments 
)
static

Format the given list values as ordered arguments within the given format pattern

Note
You may want to pre-compile your FText pattern into a FTextFormat prior to performing formats within a loop or on a critical path, as this can save CPU cycles, memory, and mutex resources vs re-compiling the pattern for each format call. See FTextFormat for more info.
Parameters
FmtThe format pattern to use
InArgumentsThe list of values to inject into the format pattern
Returns
The formatted FText

◆ Format() [4/5]

FText FText::Format ( FTextFormat  Fmt,
FFormatNamedArguments &&  InArguments 
)
static

◆ Format() [5/5]

FText FText::Format ( FTextFormat  Fmt,
FFormatOrderedArguments &&  InArguments 
)
static

◆ FormatNamed()

template<typename... TArguments>
FText FText::FormatNamed ( FTextFormat  Fmt,
TArguments &&...  Args 
)
static

Format the given list of variadic key->value pairs as named arguments within the given format pattern

Note
You may want to pre-compile your FText pattern into a FTextFormat prior to performing formats within a loop or on a critical path, as this can save CPU cycles, memory, and mutex resources vs re-compiling the pattern for each format call. See FTextFormat for more info.

@usage FText::FormatNamed(LOCTEXT("PlayerNameFmt", "{PlayerName} is really cool"), TEXT("PlayerName"), FText::FromString(PlayerName));

Parameters
FmtThe format pattern to use
ArgsA variadic list of "key then value" pairs to inject into the format pattern (must be an even number)
Returns
The formatted FText

◆ FormatOrdered()

template<typename... TArguments>
FText FText::FormatOrdered ( FTextFormat  Fmt,
TArguments &&...  Args 
)
static

Format the given list of variadic values as ordered arguments within the given format pattern

Note
You may want to pre-compile your FText pattern into a FTextFormat prior to performing formats within a loop or on a critical path, as this can save CPU cycles, memory, and mutex resources vs re-compiling the pattern for each format call. See FTextFormat for more info.

@usage FText::FormatOrdered(LOCTEXT("PlayerNameFmt", "{0} is really cool"), FText::FromString(PlayerName));

Parameters
FmtThe format pattern to use
ArgsA variadic list of values to inject into the format pattern
Returns
The formatted FText

◆ FromName()

FText FText::FromName ( const FName Val)
static

Generate an FText representing the pass name

◆ FromString() [1/7]

FText FText::FromString ( const ANSICHAR String)
static

Generate an FText representing the passed in string

◆ FromString() [2/7]

FText FText::FromString ( const FAnsiString String)
static

◆ FromString() [3/7]

FText FText::FromString ( const FString &  String)
static

◆ FromString() [4/7]

FText FText::FromString ( const FUtf8String String)
static

◆ FromString() [5/7]

FText FText::FromString ( const UTF8CHAR String)
static

◆ FromString() [6/7]

FText FText::FromString ( const WIDECHAR String)
static

◆ FromString() [7/7]

FText FText::FromString ( FString &&  String)
static

◆ FromStringTable()

FText FText::FromStringTable ( const FName  InTableId,
const FTextKey InKey,
const EStringTableLoadingPolicy  InLoadingPolicy = EStringTableLoadingPolicy::FindOrLoad 
)
static

Attempts to create an FText instance from a string table ID and key (this is the same as the LOCTABLE macro, except this can also work with non-literal string values).

Returns
The found text, or a dummy FText if not found.

◆ FromStringView() [1/3]

FText FText::FromStringView ( FAnsiStringView  InString)
static

Generate a FText representing the passed string view

◆ FromStringView() [2/3]

FText FText::FromStringView ( FUtf8StringView  InString)
static

◆ FromStringView() [3/3]

FText FText::FromStringView ( FWideStringView  InString)
static

◆ FromTextGenerator()

FText FText::FromTextGenerator ( const TSharedRef< ITextGenerator > &  TextGenerator)
static

Produces a custom-generated FText. Can be used for objects that produce text dependent on localized strings but that do not fit the standard formats.

Parameters
TextGeneratorthe text generator object that will generate the text

◆ GetEmpty()

const FText & FText::GetEmpty ( )
static

◆ GetFormatPatternParameters()

void FText::GetFormatPatternParameters ( const FTextFormat Fmt,
TArray< FString > &  ParameterNames 
)
static

◆ GetInvariantTimeZone()

FString FText::GetInvariantTimeZone ( )
static

Gets the time zone string that represents a non-specific, zero offset, culture invariant time zone.

◆ IdenticalTo()

bool FText::IdenticalTo ( const FText Other,
const ETextIdenticalModeFlags  CompareModeFlags = ETextIdenticalModeFlags::None 
) const

Check to see if this FText is identical to the other FText

Note
This function defaults to only testing that the internal data has the same target (which makes it very fast!), rather than performing any deep or lexical analysis. The ETextIdenticalModeFlags can modify this default behavior. See the comments on those flag options for more information.
If you actually want to perform a full lexical comparison, then you need to use EqualTo instead.

◆ IsCultureInvariant()

bool FText::IsCultureInvariant ( ) const

◆ IsEmpty()

bool FText::IsEmpty ( ) const

◆ IsEmptyOrWhitespace()

bool FText::IsEmptyOrWhitespace ( ) const

◆ IsFromStringTable()

bool FText::IsFromStringTable ( ) const

◆ IsInitializedFromString()

bool FText::IsInitializedFromString ( ) const

◆ IsNumeric()

bool FText::IsNumeric ( ) const

◆ IsTransient()

bool FText::IsTransient ( ) const

◆ IsWhitespace()

bool FText::IsWhitespace ( const TCHAR  Char)
static

Check to see if the given character is considered whitespace by the current culture

◆ Join() [1/3]

template<typename... ArgTypes>
static FText FText::Join ( const FText Delimiter,
ArgTypes...  Args 
)
inlinestatic

Join an arbitrary list of formattable items together, separated by the given delimiter

Note
Internally this uses FText::Format with a generated culture invariant format pattern
Parameters
DelimiterThe delimiter to insert between the items
ArgsA variadic list of values to join together
Returns
The joined FText

◆ Join() [2/3]

FText FText::Join ( const FText Delimiter,
const FFormatOrderedArguments Args 
)
static

Join an arbitrary list of formattable values together, separated by the given delimiter

Note
Internally this uses FText::Format with a generated culture invariant format pattern
Parameters
DelimiterThe delimiter to insert between the items
ArgsAn array of formattable values to join together
Returns
The joined FText

◆ Join() [3/3]

FText FText::Join ( const FText Delimiter,
const TArray< FText > &  Args 
)
static

◆ operator=() [1/2]

FText & FText::operator= ( const FText )
default

◆ operator=() [2/2]

FText & FText::operator= ( FText &&  Other)

◆ operator==()

bool FText::operator== ( FIntrusiveUnsetOptionalState  ) const
inline

◆ PreloadStringTable()

void FText::PreloadStringTable ( FName  InTableId,
const FTextKey InKey 
)
static

◆ RegisterTextGenerator() [1/3]

template<typename T >
static void FText::RegisterTextGenerator ( )
inlinestatic

Registers a standard text generator factory function.

Template Parameters
Tthe text generator class type

This function can be used if the class has a public static FName member named "TypeID".

◆ RegisterTextGenerator() [2/3]

template<typename T >
static void FText::RegisterTextGenerator ( FName  TypeID)
inlinestatic

Registers a standard text generator factory function.

Template Parameters
Tthe text generator class type
Parameters
TypeIDthe name under which to register the factor function

◆ RegisterTextGenerator() [3/3]

void FText::RegisterTextGenerator ( FName  TypeID,
FCreateTextGeneratorDelegate  FactoryFunction 
)
static

Registers a factory function to be used with serialization of text generators within FText.

Parameters
TypeIDthe name under which to register the factory function. Must match ITextGenerator::GetTypeID().
FactoryFunctionthe factory function to create the generator instance

◆ ShouldGatherForLocalization()

bool FText::ShouldGatherForLocalization ( ) const

◆ ToLower()

FText FText::ToLower ( ) const

Transforms the text to lowercase in a culture correct way.

Note
The returned instance is linked to the original and will be rebuilt if the active culture is changed.

◆ ToString()

const FString & FText::ToString ( ) const

◆ ToUpper()

FText FText::ToUpper ( ) const

Transforms the text to uppercase in a culture correct way.

Note
The returned instance is linked to the original and will be rebuilt if the active culture is changed.

◆ TrimPreceding()

FText FText::TrimPreceding ( const FText InText)
static

Removes any whitespace characters from the start of the text.

◆ TrimPrecedingAndTrailing()

FText FText::TrimPrecedingAndTrailing ( const FText InText)
static

Removes any whitespace characters from the start and end of the text.

◆ TrimTrailing()

FText FText::TrimTrailing ( const FText InText)
static

Removes any whitespace characters from the end of the text.

◆ UnregisterTextGenerator() [1/2]

template<typename T >
static void FText::UnregisterTextGenerator ( )
inlinestatic

Unregisters a standard text generator factory function.

This function can be used if the class has a public static FName member named "TypeID".

Template Parameters
Tthe text generator class type

◆ UnregisterTextGenerator() [2/2]

void FText::UnregisterTextGenerator ( FName  TypeID)
static

Unregisters a factory function to be used with serialization of text generators within FText.

Parameters
TypeIDthe name to remove from registration
See also
RegisterTextGenerator

Friends And Related Symbol Documentation

◆ FArchive

friend class FArchive
friend

◆ FArchiveFromStructuredArchiveImpl

friend class FArchiveFromStructuredArchiveImpl
friend

◆ FFormatArgumentValue

◆ FJsonArchiveInputFormatter

friend class FJsonArchiveInputFormatter
friend

◆ FJsonArchiveOutputFormatter

friend class FJsonArchiveOutputFormatter
friend

◆ FScopedTextIdentityPreserver

friend class FScopedTextIdentityPreserver
friend

◆ FStringTableRegistry

◆ FTextCache

friend class FTextCache
friend

◆ FTextFormatData

friend class FTextFormatData
friend

◆ FTextFormatter

friend class FTextFormatter
friend

◆ FTextHistory_ArgumentDataFormat

◆ FTextHistory_NamedFormat

◆ FTextHistory_OrderedFormat

◆ FTextHistory_Transform

◆ FTextInspector

friend class FTextInspector
friend

◆ FTextProperty

friend class FTextProperty
friend

◆ FTextSnapshot

friend class FTextSnapshot
friend

◆ FTextStringHelper

friend class FTextStringHelper
friend

Member Data Documentation

◆ bHasIntrusiveUnsetOptionalState

constexpr bool FText::bHasIntrusiveUnsetOptionalState = true
staticconstexpr

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