W3cubDocs

/Liquid

strip

Removes all whitespace (tabs, spaces, and newlines) from both the left and right side of a string. It does not affect spaces between words.

Input

{{ "          So much room for activities!          " | strip }}

Output

So much room for activities!

© 2005, 2006 Tobias Luetke
Licensed under the MIT License.
https://shopify.github.io/liquid/filters/strip/