Navigation
Unreal Engine C++ API Reference > Runtime > Core > UObject
References
Module | Core |
Header | /Engine/Source/Runtime/Core/Public/UObject/NameTypes.h |
Include | #include "UObject/NameTypes.h" |
Syntax
class FName
Remarks
Public name, available to the world. Names are stored as a combination of an index into a table of unique strings and an instance number. Names are case-insensitive, but case-preserving (when WITH_CASE_PRESERVING_NAME is 1)
Constructors
Type | Name | Description | |
---|---|---|---|
![]() |
FName () |
Default constructor, initialized to None | |
![]() |
FName
(
const WIDECHAR* Name, |
Create an FName. | |
![]() |
FName
(
const ANSICHAR* Name, |
||
![]() |
|||
![]() |
FName
(
TStringView< ANSICHAR > View, |
||
![]() |
FName
(
TStringView< WIDECHAR > View, |
Create an FName with a hardcoded string index. | |
![]() |
FName
(
TStringView< UTF8CHAR > View, |
Create an FName with a hardcoded string index. | |
![]() |
FName
(
const WIDECHAR* Name, |
Create an FName. | |
![]() |
FName
(
const ANSICHAR* Name, |
||
![]() |
|||
![]() |
FName
(
TStringView< ANSICHAR > View, |
||
![]() |
FName
(
EName Ename |
Create an FName with a hardcoded string index. | |
![]() |
FName
(
TStringView< WIDECHAR > View, |
Create an FName with a hardcoded string index. | |
![]() |
FName
(
TStringView< UTF8CHAR > View, |
Create an FName with a hardcoded string index. | |
![]() |
FName
(
FNameEntryId InComparisonIndex, |
Create an FName from its component parts Only call this if you really know what you're doing | |
![]() |
FName
(
int32 Len, |
Create FName from non-null string with known length | |
![]() |
FName
(
int32 Len, |
||
![]() |
|||
![]() |
FName
(
int32 Len, |
||
![]() |
FName
(
int32 Len, |
||
![]() |
|||
![]() |
FName
(
const TCHAR* Name, |
Create an FName. | |
![]() |
FName
(
ENoInit |
Scary no init constructor, used for something obscure in UObjectBase | |
![]() |
FName
(
FMinimalName InName |
||
![]() |
FName
(
FScriptName InName |
Create an FName with a hardcoded string index. | |
![]() |
FName
(
FMemoryImageName InName |
Create an FName with a hardcoded string index. | |
![]() |
FName
(
const FNameEntrySerialized& LoadedEntry |
Constructor used by FLinkerLoad when loading its name table; Creates an FName with an instance number of 0 that does not attempt to split the FName into string and number portions. | |
![]() |
FName
(
EName Ename, |
Create an FName with a hardcoded string index and (instance). | |
![]() |
Create an FName from an existing string, but with a different instance. |
Functions
Type | Name | Description | |
---|---|---|---|
![]() ![]() |
void | AddNameToDisplayStringExemption
(
const FString& InExemption |
Add/remove an exemption to the formatting applied by NameToDisplayString. |
![]() ![]() |
void | AppendString
(
FUtf8StringBuilderBase& Out |
Converts an FName to a readable format, in place, appending to an existing string (ala GetFullName) |
![]() ![]() |
void | AppendString
(
FWideStringBuilderBase& Out |
Converts an FName to a readable format, in place, appending to an existing string (ala GetFullName) |
![]() ![]() |
void | AppendString
(
FString& Out |
Converts an FName to a readable format, in place, appending to an existing string (ala GetFullName) |
![]() ![]() |
void | AppendStringInternal
(
StringBuilderType& Out |
|
![]() ![]() |
void | AutoTest () |
Run autotest on FNames. |
![]() ![]() |
int32 | Compares name to passed in one. Sort is alphabetical ascending. | |
![]() ![]() |
int32 | CompareIndexes
(
const FName& Other |
Fast non-alphabetical order that is only stable during this process' lifetime. |
![]() ![]() |
FName | CreateFromDisplayId
(
FNameEntryId DisplayId, |
Only call this if you really know what you're doing |
![]() ![]() |
TArray< const FNameEntry * > | DebugDump () |
|
![]() ![]() |
void | DisplayHash
(
FOutputDevice& Ar |
|
![]() ![]() |
bool | Fast non-alphabetical order that is only stable during this process' lifetime. | |
![]() ![]() |
FNameEntryId | GetComparisonIdFromDisplayId
(
FNameEntryId DisplayId |
|
![]() ![]() |
FNameEntryId | ||
![]() ![]() |
const FNameEntry * | ||
![]() ![]() |
FNameEntryId | ||
![]() ![]() |
const FNameEntry * | ||
![]() ![]() |
FNameEntry const * | GetEntry
(
FNameEntryId Id |
|
![]() ![]() |
FNameEntry const * | GetEntry
(
EName Ename |
|
![]() ![]() |
int32 | ||
![]() ![]() |
int32 | ||
![]() ![]() |
int32 | ||
![]() ![]() |
int32 | GetNumber () |
|
![]() ![]() |
int32 | ||
![]() ![]() |
void | GetPlainANSIString
(
ANSICHAR(&) AnsiName |
Copy ANSI name without number part. Must only be used for ANSI FNames. Doesn't allocate. |
![]() ![]() |
FString | Get name without number part as a dynamically allocated string | |
![]() ![]() |
uint32 | GetPlainNameString
(
TCHAR(&) OutName |
Convert name without number part into TCHAR buffer and returns string length. Doesn't allocate. |
![]() ![]() |
void | GetPlainWIDEString
(
WIDECHAR(&) WideName |
Copy wide name without number part. Must only be used for wide FNames. Doesn't allocate. |
![]() ![]() |
uint32 | Get the number of characters, excluding null-terminator, that ToString() would yield | |
![]() ![]() |
bool | Check to see if this FName matches the other FName, potentially also checking for any case variations | |
![]() ![]() |
bool | IsNone () |
True for FName(), FName(NAME_None) and FName("None") |
![]() ![]() |
bool | IsValid () |
Paranoid sanity check |
![]() ![]() |
bool | IsValidGroupName
(
FText& OutReason, |
Takes an FName and checks to see that it follows the rules that Unreal requires for package or group names. |
![]() ![]() |
bool | Paranoid sanity check, same as IsValid() | |
![]() ![]() |
bool | IsValidObjectName
(
FText& OutReason |
Takes an FName and checks to see that it follows the rules that Unreal requires for object names. |
![]() ![]() |
bool | IsValidXName
(
const FStringView& InName, |
Checks to see that a given name-like string follows the rules that Unreal requires. |
![]() ![]() |
bool | IsValidXName
(
const TCHAR* InName, |
Checks to see that a given name-like string follows the rules that Unreal requires. |
![]() ![]() |
bool | IsValidXName
(
const FName InName, |
Checks to see that a given name-like string follows the rules that Unreal requires. |
![]() ![]() |
bool | IsValidXName
(
const FString& InInvalidChars, |
Checks to see that a FName follows the rules that Unreal requires. |
![]() ![]() |
bool | IsValidXName
(
FText& OutReason, |
Takes an FName and checks to see that it follows the rules that Unreal requires. |
![]() ![]() |
bool | IsValidXName
(
const FString& InName, |
Checks to see that a given name-like string follows the rules that Unreal requires. |
![]() ![]() |
bool | LexicalLess
(
const FName& Other |
Slow alphabetical order that is stable / deterministic over process runs. |
![]() ![]() |
FString | NameToDisplayString
(
const FString& InDisplayName, |
Takes a string and breaks it down into a human readable string. |
![]() ![]() |
void | RemoveNameToDisplayStringExemption
(
const FString& InExemption |
|
![]() ![]() |
FString | SafeString
(
FNameEntryId InDisplayIndex, |
|
![]() ![]() |
FString | SanitizeWhitespace
(
const FString& FNameString |
Printing FNames in logging or on screen can be problematic when they contain Whitespace characters such as |
![]() |
void | SetNumber
(
const int32 NewNumber |
|
![]() ![]() |
void | TearDown () |
Tear down system and free all allocated memory |
![]() ![]() |
const EName * | ToEName () |
Get the EName that this FName represents or nullptr |
![]() ![]() |
void | ToString
(
FUtf8StringBuilderBase& Out |
Converts an FName to a readable format |
![]() ![]() |
void | ToString
(
FWideStringBuilderBase& Out |
Converts an FName to a readable format, in place |
![]() ![]() |
void | Converts an FName to a readable format, in place | |
![]() ![]() |
uint32 | ToString
(
TCHAR* Out, |
Convert to string buffer to avoid dynamic allocations and returns string length |
![]() ![]() |
uint32 | ToString
(
TCHAR(&) Out |
|
![]() ![]() |
FString | ToString () |
Converts an FName to a readable format |
![]() ![]() |
uint64 | Returns an integer that compares equal in the same way FNames do, only usable within the current process | |
![]() ![]() |
bool | TryAppendAnsiString
(
FAnsiStringBuilderBase& Out |
Converts an ANSI FName to a readable format appended to the string builder. |
Operators
Type | Name | Description | |
---|---|---|---|
![]() ![]() |
bool | operator!=
(
FName Other |
|
![]() ![]() |
bool | operator==
(
FName Other |
Constants
Name | Description |
---|---|
StringBufferSize | Buffer size required for any null-terminated FName string, i.e. [name] '_' [digits] '\0' |