UKismetStringLibrary::TrimTrailing
#include "Kismet/KismetStringLibrary.h"
Access: public
Specifiers: staticBlueprintPure
Description
Removes whitespace characters from the end of a string, leaving the front untouched.
Caveats & Gotchas
- • Does not affect leading whitespace — combine with Trim to strip both ends.
- • Text produced by LeftPad/RightPad relies on trailing spaces, so calling this on padded output undoes the padding.
Signature
static FString TrimTrailing(const FString& SourceString) Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| SourceString | const FString& | The string to trim. | — |
Return Type
FString Example
Strip trailing newline from console output C++
FString CleanLine = UKismetStringLibrary::TrimTrailing(RawLine); See Also
Tags
Version History
Introduced in: unknown
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?