Awee

shorten

Shorten truncates a string to the given maximum character length.

Shorten truncates a string to the given maximum character length.

Input

string

Parameters

#TypeRequired
0intyes

Returns

string

Examples

Clip a description for a card preview

Input

description = "Hand-picked single-origin coffee, slow-roasted in small batches."

Template

{{ description | shorten:30 }}

Output

Hand-picked single-origin cof

Limit a name to a column width

Input

name = "Alexandra Christine Whitehead"

Template

{{ name | shorten:12 }}

Output

Alexandra Ch

How is this guide?

On this page