Modifier: trim


Returns a string with whitespace removed from the start and end of the string. Supports the removal of unicode whitespace.

YAML
string: "    This is so sloppy   "
Template
{{ string | trim }}
Output
This is so sloppy

Additional Reading

Learn how to use and chain modifiers in the Antlers template guide.

Last modified on October 28, 2016