Skip to main content

Overview

The truncate transformation truncates the input to a specific size, with optional start position and ellipsis.

Syntax

truncate(<variable>, start=0, end=10, ellipsis=false, smart=false)

Parameters

ParameterTypeRequiredDefaultDescription
variablestringYes-The text to truncate
startnumberYes-Start position for truncation
endnumberNo-Maximum character length
ellipsisbooleanYes-Whether to add ellipsis (…) at the end
smartbooleanNo-When true, truncates at the last space before the end position

Examples

truncate(<variable>, start=0, end=10, ellipsis=false)
truncate(<variable>, 0, 20, true)
truncate(<variable>, start=0, end=50, ellipsis=true, smart=true)