UKismetStringLibrary::Left
#include "Kismet/KismetStringLibrary.h"
Access: public
Specifiers: staticBlueprintPure
Description
Returns the leftmost given number of characters from a string.
Caveats & Gotchas
- • If Count is greater than or equal to the string's length, the entire string is returned rather than erroring.
- • A negative Count is clamped to zero, returning an empty string rather than counting from the right — use Right for that.
Signature
static FString Left(const FString& SourceString, int32 Count) Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| SourceString | const FString& | The string to take characters from. | — |
| Count | int32 | The number of characters to keep from the start. | — |
Return Type
FString Example
Take a fixed-width prefix C++
FString Prefix = UKismetStringLibrary::Left(TEXT("PlayerName_01"), 10);
// Prefix == "PlayerName" Tags
Version History
Introduced in: unknown
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?