Files
liquid/filters/truncate.md
2016-04-02 18:46:32 -04:00

492 B

title
title
truncate

truncate shortens a string down to the number of characters passed as a parameter. If the number of characters specified is less than the length of the string, an ellipsis (...) is appended to the string and is included in the character count.

Input

```liquid {% raw %} {{ "Ground control to Major Tom." | truncate: 20 }} {% endraw %} ```

Output

```text {{ "Ground control to Major Tom." | truncate: 20 }} ```