SlugStringForValidName

Given a display label string, generates an [FString](API\Runtime\Core\Containers\FString) slug that only contains valid characters for an [FName](API\Runtime\Core\UObject\FName).

Windows
MacOS
Linux

References

Module

Core

Header

/Engine/Source/Runtime/Core/Public/Containers/UnrealString.h

Include

#include "Containers/UnrealString.h"

Source

/Engine/Source/Runtime/Core/Private/Containers/String.cpp

Syntax

FString SlugStringForValidName
(
    const FString & DisplayString,
    const TCHAR * ReplaceWith
)

Remarks

Given a display label string, generates an FString slug that only contains valid characters for an FName. For example, "[MyObject]: Object Label" becomes "MyObjectObjectLabel" FName slug.

Returns

The slugged string

Parameters

Parameter

Description

DisplayLabel

The label string to convert to an FName

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