UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
Text.h File Reference

Go to the source code of this file.

Classes

struct  FNumberFormattingOptions
 
struct  FNumberParsingOptions
 
class  FTextFormat
 
class  FText
 
class  FText::FSortPredicate
 
class  FFormatArgumentValue
 
struct  FFormatArgumentData
 
class  FHistoricTextFormatData
 
class  FHistoricTextNumericData
 
class  FTextSnapshot
 
class  FTextInspector
 
class  FTextStringHelper
 
class  FTextBuilder
 
struct  FUnicodeChar
 
struct  TextBiDi::FTextDirectionInfo
 
class  TextBiDi::ITextBiDi
 

Namespaces

namespace  ETextFlag
 
namespace  EDateTimeStyle
 
namespace  EFormatArgumentType
 
namespace  TextFormatUtil
 
namespace  TextBiDi
 

Typedefs

typedef TSortedMap< FString, FFormatArgumentValue, FDefaultAllocator, FLocKeySortedMapLessFFormatNamedArguments
 
typedef TArray< FFormatArgumentValueFFormatOrderedArguments
 
typedef TSharedRef< FTextFormatPatternDefinition, ESPMode::ThreadSafeFTextFormatPatternDefinitionRef
 
typedef TSharedPtr< FTextFormatPatternDefinition, ESPMode::ThreadSafeFTextFormatPatternDefinitionPtr
 
typedef TSharedRef< const FTextFormatPatternDefinition, ESPMode::ThreadSafeFTextFormatPatternDefinitionConstRef
 
typedef TSharedPtr< const FTextFormatPatternDefinition, ESPMode::ThreadSafeFTextFormatPatternDefinitionConstPtr
 

Enumerations

enum  ETextFlag::Type {
  ETextFlag::Transient = (1 << 0) , ETextFlag::CultureInvariant = (1 << 1) , ETextFlag::ConvertedProperty = (1 << 2) , ETextFlag::Immutable = (1 << 3) ,
  ETextFlag::InitializedFromString = (1<<4)
}
 
enum class  ETextIdenticalModeFlags : uint8 { None = 0 , DeepCompare = 1<<0 , LexicalCompareInvariants = 1<<1 }
 
enum class  ETextFormatFlags : uint8 { None = 0 , EvaluateArgumentModifiers = 1<<0 , Default = EvaluateArgumentModifiers }
 
enum class  ETextPluralType : uint8 { Cardinal , Ordinal }
 
enum class  ETextPluralForm : uint8 {
  Zero = 0 , One , Two , Few ,
  Many , Other , Count
}
 
enum class  ETextGender : uint8 {
  Masculine , Feminine , Neuter , Masculine ,
  Feminine , Neuter
}
 
enum  EDateTimeStyle::Type : int {
  EDateTimeStyle::Default , EDateTimeStyle::Short , EDateTimeStyle::Medium , EDateTimeStyle::Long ,
  EDateTimeStyle::Full , EDateTimeStyle::Custom , EDateTimeStyle::Default , EDateTimeStyle::Short ,
  EDateTimeStyle::Medium , EDateTimeStyle::Long , EDateTimeStyle::Full , EDateTimeStyle::UMETA =(Hidden)
}
 
enum  EFormatArgumentType::Type : int {
  EFormatArgumentType::Int , EFormatArgumentType::UInt , EFormatArgumentType::Float , EFormatArgumentType::Double ,
  EFormatArgumentType::Text , EFormatArgumentType::Gender , EFormatArgumentType::Int , EFormatArgumentType::UInt ,
  EFormatArgumentType::Float , EFormatArgumentType::Double , EFormatArgumentType::Text , EFormatArgumentType::Gender
}
 
enum  ERoundingMode : int {
  HalfToEven , HalfFromZero , HalfToZero , FromZero ,
  ToZero , ToNegativeInfinity , ToPositiveInfinity
}
 
enum  EMemoryUnitStandard : int { IEC , SI }
 
enum class  TextBiDi::ETextDirection : uint8 { TextBiDi::LeftToRight , TextBiDi::RightToLeft , TextBiDi::Mixed }
 

Functions

 ENUM_CLASS_FLAGS (ETextIdenticalModeFlags)
 
 ENUM_CLASS_FLAGS (ETextFormatFlags)
 
CORE_API bool LexTryParseString (ETextGender &OutValue, const TCHAR *Buffer)
 
CORE_API void LexFromString (ETextGender &OutValue, const TCHAR *Buffer)
 
CORE_API const TCHARLexToString (ETextGender InValue)
 
CORE_API bool LexTryParseString (EDateTimeStyle::Type &OutValue, const TCHAR *Buffer)
 
CORE_API void LexFromString (EDateTimeStyle::Type &OutValue, const TCHAR *Buffer)
 
CORE_API const TCHARLexToString (EDateTimeStyle::Type InValue)
 
CORE_API bool LexTryParseString (ERoundingMode &OutValue, const TCHAR *Buffer)
 
CORE_API void LexFromString (ERoundingMode &OutValue, const TCHAR *Buffer)
 
CORE_API const TCHARLexToString (ERoundingMode InValue)
 
template<typename TName , typename TValue >
void TextFormatUtil::FormatNamed (OUT FFormatNamedArguments &Result, TName &&Name, TValue &&Value)
 
template<typename TName , typename TValue , typename... TArguments>
void TextFormatUtil::FormatNamed (OUT FFormatNamedArguments &Result, TName &&Name, TValue &&Value, TArguments &&... Args)
 
template<typename TValue >
void TextFormatUtil::FormatOrdered (OUT FFormatOrderedArguments &Result, TValue &&Value)
 
template<typename TValue , typename... TArguments>
void TextFormatUtil::FormatOrdered (OUT FFormatOrderedArguments &Result, TValue &&Value, TArguments &&... Args)
 
TUniquePtr< ITextBiDiTextBiDi::CreateTextBiDi ()
 
ETextDirection TextBiDi::ComputeTextDirection (const FText &InText)
 
ETextDirection TextBiDi::ComputeTextDirection (const FString &InString)
 
ETextDirection TextBiDi::ComputeTextDirection (const TCHAR *InString, const int32 InStringStartIndex, const int32 InStringLen)
 
ETextDirection TextBiDi::ComputeTextDirection (const FText &InText, const ETextDirection InBaseDirection, TArray< FTextDirectionInfo > &OutTextDirectionInfo)
 
ETextDirection TextBiDi::ComputeTextDirection (const FString &InString, const ETextDirection InBaseDirection, TArray< FTextDirectionInfo > &OutTextDirectionInfo)
 
ETextDirection TextBiDi::ComputeTextDirection (const TCHAR *InString, const int32 InStringStartIndex, const int32 InStringLen, const ETextDirection InBaseDirection, TArray< FTextDirectionInfo > &OutTextDirectionInfo)
 
ETextDirection TextBiDi::ComputeBaseDirection (const FText &InText)
 
ETextDirection TextBiDi::ComputeBaseDirection (const FString &InString)
 
ETextDirection TextBiDi::ComputeBaseDirection (const TCHAR *InString, const int32 InStringStartIndex, const int32 InStringLen)
 
CORE_API bool TextBiDi::IsControlCharacter (const TCHAR InChar)
 

Typedef Documentation

◆ FFormatNamedArguments

◆ FFormatOrderedArguments

◆ FTextFormatPatternDefinitionConstPtr

◆ FTextFormatPatternDefinitionConstRef

◆ FTextFormatPatternDefinitionPtr

◆ FTextFormatPatternDefinitionRef

Enumeration Type Documentation

◆ EMemoryUnitStandard

Redeclared in KismetTextLibrary for meta-data extraction purposes, be sure to update there as well

Enumerator
IEC 
SI 

◆ ERoundingMode

Redeclared in KismetTextLibrary for meta-data extraction purposes, be sure to update there as well

Enumerator
HalfToEven 

Rounds to the nearest place, equidistant ties go to the value which is closest to an even value: 1.5 becomes 2, 0.5 becomes 0

HalfFromZero 

Rounds to nearest place, equidistant ties go to the value which is further from zero: -0.5 becomes -1.0, 0.5 becomes 1.0

HalfToZero 

Rounds to nearest place, equidistant ties go to the value which is closer to zero: -0.5 becomes 0, 0.5 becomes 0.

FromZero 

Rounds to the value which is further from zero, "larger" in absolute value: 0.1 becomes 1, -0.1 becomes -1

ToZero 

Rounds to the value which is closer to zero, "smaller" in absolute value: 0.1 becomes 0, -0.1 becomes 0

ToNegativeInfinity 

Rounds to the value which is more negative: 0.1 becomes 0, -0.1 becomes -1

ToPositiveInfinity 

Rounds to the value which is more positive: 0.1 becomes 1, -0.1 becomes 0

◆ ETextFormatFlags

enum class ETextFormatFlags : uint8
strong
Enumerator
None 

No special behavior

EvaluateArgumentModifiers 

Set to evaluate argument modifiers when formatting text Unset to print the literal argument modifier syntax into the result

Default 

Default formatting flags

◆ ETextGender

enum class ETextGender : uint8
strong

Redeclared in KismetTextLibrary for meta-data extraction purposes, be sure to update there as well

Enumerator
Masculine 
Feminine 
Neuter 
Masculine 
Feminine 
Neuter 

◆ ETextIdenticalModeFlags

Enumerator
None 

No special behavior

DeepCompare 

Deep compare the text data.

When set, two pieces of generated text (eg, from FText::Format, FText::AsNumber, FText::AsDate, FText::ToUpper, etc) will test their internal data to see if they contain identical inputs (so would produce an identical output).

When clear, no two separate pieces of generated text will ever compare as identical!

LexicalCompareInvariants 

Compare invariant data lexically.

When set, two pieces of invariant text (eg, from FText::AsCultureInvariant, FText::FromString, FText::FromName, or INVTEXT) will compare their display string data lexically to see if they are identical.

When clear, no two separate pieces of invariant text will ever compare as identical!

◆ ETextPluralForm

enum class ETextPluralForm : uint8
strong
Enumerator
Zero 
One 
Two 
Few 
Many 
Other 
Count 

◆ ETextPluralType

enum class ETextPluralType : uint8
strong
Enumerator
Cardinal 
Ordinal 

Function Documentation

◆ ENUM_CLASS_FLAGS() [1/2]

ENUM_CLASS_FLAGS ( ETextFormatFlags  )

◆ ENUM_CLASS_FLAGS() [2/2]

ENUM_CLASS_FLAGS ( ETextIdenticalModeFlags  )

◆ LexFromString() [1/3]

CORE_API void LexFromString ( EDateTimeStyle::Type OutValue,
const TCHAR Buffer 
)

◆ LexFromString() [2/3]

CORE_API void LexFromString ( ERoundingMode OutValue,
const TCHAR Buffer 
)

◆ LexFromString() [3/3]

CORE_API void LexFromString ( ETextGender OutValue,
const TCHAR Buffer 
)

◆ LexToString() [1/3]

CORE_API const TCHAR * LexToString ( EDateTimeStyle::Type  InValue)

◆ LexToString() [2/3]

CORE_API const TCHAR * LexToString ( ERoundingMode  InValue)

◆ LexToString() [3/3]

CORE_API const TCHAR * LexToString ( ETextGender  InValue)

◆ LexTryParseString() [1/3]

CORE_API bool LexTryParseString ( EDateTimeStyle::Type OutValue,
const TCHAR Buffer 
)

◆ LexTryParseString() [2/3]

CORE_API bool LexTryParseString ( ERoundingMode OutValue,
const TCHAR Buffer 
)

◆ LexTryParseString() [3/3]

CORE_API bool LexTryParseString ( ETextGender OutValue,
const TCHAR Buffer 
)