mirror of
https://github.com/kemko/liquid.git
synced 2026-01-04 17:25:41 +03:00
492 B
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 }} ```