Skip to content

Truncate

mapping category: string no `||`

Truncates a string to at most the given number of characters.

If the input string is longer than the configured maximum length, it is truncated; if it is shorter, it is returned unchanged.

Parameters

1maxLength Mandatory — accepts: INT

Maximum length the input string can have after truncation.

Input type

  • STRING

Output type

  • STRING

Examples

Truncate to 5 characters

Truncate(5)

Truncate to 40 characters

Truncate(40)

See also

Trim, SubString, PrePad, PostPad