Description
Appends the full name string (including numeric suffix) to an existing FString or string builder without creating an intermediate FString allocation. Preferred over ToString() in GetFullName-style concatenation.
Caveats & Gotchas
- • Multiple overloads exist: FWideString&, FUtf8String&, FWideStringBuilderBase&, FUtf8StringBuilderBase&. Pick the overload that matches your accumulation type to avoid unnecessary conversions.
- • This appends the same content as ToString() — numeric suffix included. There is no AppendPlainString equivalent; to append the suffix-free name you must call GetPlainNameString() and concatenate manually.
- • When building long composite strings (e.g. object full paths), prefer a TStringBuilder<256> and AppendString over repeated FString concatenation, which reallocates on each call.
Signature
CORE_API void AppendString(FWideString& Out) const Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| Out | FWideString& | The string or string builder to append the name representation into. | — |
Return Type
void Example
Build a full object path without intermediate allocations C++
TStringBuilder<256> PathBuilder;
PathBuilder.Append(TEXT("/Game/Maps/"));
LevelName.AppendString(PathBuilder);
FString FullPath = PathBuilder.ToString();
UE_LOG(LogTemp, Log, TEXT("Path: %s"), *FullPath); See Also
Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?