Clamp Text Length

Pure
ClampTextLength

Truncates 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

NameTypeDefaultDescription
TextFStringText parameter
MaxCharactersint32MaxCharacters parameter
SuffixFStringSuffix parameter

Outputs

NameTypeDescription
ReturnValueFStringReturnValue 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.