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

#include <TextKey.h>

Public Member Functions

 FTextKey ()=default
 
CORE_API FTextKey (FStringView InStr)
 
CORE_API FTextKey (const TCHAR *InStr)
 
CORE_API FTextKey (const FString &InStr)
 
CORE_API const TCHARGetChars () const
 
CORE_API FString ToString () const
 
CORE_API void ToString (FString &Out) const
 
CORE_API void ToString (FStringBuilderBase &Out) const
 
CORE_API void AppendString (FString &Out) const
 
CORE_API void AppendString (FStringBuilderBase &Out) const
 
CORE_API void SerializeAsString (FArchive &Ar)
 
CORE_API void SerializeWithHash (FArchive &Ar)
 
CORE_API void SerializeDiscardHash (FArchive &Ar)
 
CORE_API void SerializeAsString (FStructuredArchiveSlot Slot)
 
CORE_API void SerializeWithHash (FStructuredArchiveSlot Slot)
 
CORE_API void SerializeDiscardHash (FStructuredArchiveSlot Slot)
 
UE_FORCEINLINE_HINT bool IsEmpty () const
 
void Reset ()
 

Static Public Member Functions

static CORE_API void CompactDataStructures ()
 
static CORE_API void TearDown ()
 

Friends

class FTextKeyState
 
UE_FORCEINLINE_HINT bool operator== (const FTextKey &A, const FTextKey &B)
 
UE_FORCEINLINE_HINT bool operator!= (const FTextKey &A, const FTextKey &B)
 
CORE_API uint32 GetTypeHash (const FTextKey &A)
 

Detailed Description

Optimized representation of a case-sensitive string, as used by localization keys. This references an entry within a internal table to avoid memory duplication, as well as offering optimized comparison and hashing performance.

Constructor & Destructor Documentation

◆ FTextKey() [1/4]

FTextKey::FTextKey ( )
default

◆ FTextKey() [2/4]

FTextKey::FTextKey ( FStringView  InStr)

◆ FTextKey() [3/4]

FTextKey::FTextKey ( const TCHAR InStr)

◆ FTextKey() [4/4]

FTextKey::FTextKey ( const FString &  InStr)

Member Function Documentation

◆ AppendString() [1/2]

void FTextKey::AppendString ( FString &  Out) const

◆ AppendString() [2/2]

void FTextKey::AppendString ( FStringBuilderBase Out) const

◆ CompactDataStructures()

void FTextKey::CompactDataStructures ( )
static

Compact any slack within the internal table

◆ GetChars()

const TCHAR * FTextKey::GetChars ( ) const

Get the underlying chars buffer this text key represents

◆ IsEmpty()

UE_FORCEINLINE_HINT bool FTextKey::IsEmpty ( ) const
inline

Is this text key empty?

◆ Reset()

void FTextKey::Reset ( )
inline

Reset this text key to be empty

◆ SerializeAsString() [1/2]

void FTextKey::SerializeAsString ( FArchive Ar)

Serialize this text key as if it were an FString

◆ SerializeAsString() [2/2]

void FTextKey::SerializeAsString ( FStructuredArchiveSlot  Slot)

Serialize this text key as if it were an FString

◆ SerializeDiscardHash() [1/2]

void FTextKey::SerializeDiscardHash ( FArchive Ar)

Serialize this text key including its hash value, discarding the hash on load (to upgrade from an older hashing algorithm)

◆ SerializeDiscardHash() [2/2]

void FTextKey::SerializeDiscardHash ( FStructuredArchiveSlot  Slot)

Serialize this text key including its hash value, discarding the hash on load (to upgrade from an older hashing algorithm)

◆ SerializeWithHash() [1/2]

void FTextKey::SerializeWithHash ( FArchive Ar)

Serialize this text key including its hash value (this method is sensitive to hashing algorithm changes, so only use it for generated files that can be rebuilt from another source)

◆ SerializeWithHash() [2/2]

void FTextKey::SerializeWithHash ( FStructuredArchiveSlot  Slot)

Serialize this text key including its hash value (this method is sensitive to hashing algorithm changes, so only use it for generated files that can be rebuilt from another source)

◆ TearDown()

void FTextKey::TearDown ( )
static

Do not use any FTextKey or FTextId after calling this

◆ ToString() [1/3]

FString FTextKey::ToString ( ) const

Convert this text key back to its string representation

◆ ToString() [2/3]

void FTextKey::ToString ( FString &  Out) const

◆ ToString() [3/3]

void FTextKey::ToString ( FStringBuilderBase Out) const

Friends And Related Symbol Documentation

◆ FTextKeyState

friend class FTextKeyState
friend

◆ GetTypeHash

CORE_API uint32 GetTypeHash ( const FTextKey A)
friend

Get the hash of this text key

◆ operator!=

UE_FORCEINLINE_HINT bool operator!= ( const FTextKey A,
const FTextKey B 
)
friend

Compare for inequality

◆ operator==

UE_FORCEINLINE_HINT bool operator== ( const FTextKey A,
const FTextKey B 
)
friend

Compare for equality


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