TruncateChars method (text)

Truncates this text if it is longer than the specified number of characters.

Syntax

text.TruncateChars(count)
text.TruncateChars(count, suffix)

Truncates text if it is longer that count characters in length. If the text is truncated the value of suffix is appended.

count: The number of characters to truncate after.

suffix: The text value to append to the text if it is truncated.

The default value for suffix is '…' (ellipsis).

Example

{% Var text = 'The quick brown fox jumps over the lazy dog' %}

{{ text.TruncateChars(15) }}

The above example would output: The quick brown….