UKismetStringLibrary::Right
#include "Kismet/KismetStringLibrary.h"
Access: public
Specifiers: staticBlueprintPure
Description
Returns the string counting back Count characters from the end. Commonly used to grab a fixed-width suffix such as a file extension or numeric tag.
Caveats & Gotchas
- • If Count is greater than or equal to the string's length, the entire string is returned.
- • Despite the name matching RightChop, the two count in opposite directions — Right(S, N) keeps N characters, RightChop(S, N) discards N characters.
Signature
static FString Right(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, counting back from the end. | — |
Return Type
FString Example
Grab the last few characters C++
FString Suffix = UKismetStringLibrary::Right(TEXT("Actor_042"), 3);
// Suffix == "042" Tags
Version History
Introduced in: unknown
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?