FTextKey

Optimized representation of a case-sensitive string, as used by localization keys.

References

Module

Core

Header

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

Include

#include "Internationalization/TextKey.h"

Syntax

class FTextKey

Remarks

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.

Constructors

Name Description

Public function

FTextKey()

Public function

FTextKey

(
    const TCHAR* InStr
)

Public function

FTextKey

(
    const FString& InStr
)

Public function

FTextKey

(
    FString&& InStr
)

Functions

Name Description

Public function Static

void

 

CompactDataStructures()

Compact any slack within the internal table

Public function Const

const TCHAR ...

 

GetChars()

Get the underlying chars buffer this text key represents

Public function Const

bool

 

IsEmpty()

Is this text key empty?

Public function

void

 

Reset()

Reset this text key to be empty

Public function

void

 

SerializeAsString

(
    FArchive& Ar
)

Serialize this text key as if it were an FString

Public function

void

 

SerializeAsString

(
    FStructuredArchiveSlot Slot
)

Serialize this text key as if it were an FString

Public function

void

 

SerializeDiscardHash

(
    FArchive& Ar
)

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

Public function

void

 

SerializeDiscardHash

(
    FStructuredArchiveSlot Slot
)

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

Public function

void

 

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)

Public function

void

 

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)

Public function Static

void

 

TearDown()

Do not use any FTextKey or FTextId after calling this

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