Clamp Text Length
PureClampTextLengthTruncates a string to MaxCharacters and appends Suffix if truncation occurred. Use '...' as the suffix for readable UI labels.
Type: Pure (no side effects)
Category: Fortuna|UMG/UI Helpers
Keywords: umg/ui helpers
Inputs
| Name | Type | Default | Description |
|---|---|---|---|
| Text | FString | — | Text parameter |
| MaxCharacters | int32 | — | MaxCharacters parameter |
| Suffix | FString | — | Suffix parameter |
Outputs
| Name | Type | Description |
|---|---|---|
| ReturnValue | FString | ReturnValue output |
Example Use Cases
Example 1
Cap a player name to 20 characters with ellipsis in a scoreboard.
Example 2
Truncate item descriptions in an inventory tooltip.