Truncate With Ellipsis

Pure
TruncateWithEllipsis

Truncates a string and appends '...' if it exceeds MaxLength.

Type: Pure (no side effects)
Category: Fortuna|String & Text
Keywords: string & text

Inputs

NameTypeDefaultDescription
InputFStringInput parameter
MaxLengthintMaxLength parameter

Outputs

NameTypeDescription
ReturnValueFStringReturnValue output

Example Use Cases

Example 1

Shorten long player names in a leaderboard.

Example 2

Trim item descriptions for a compact tooltip.