rstrip
string | rstrip
returns string
Strips all whitespace from the right of a string.
{%- assign text = ' Some potions create whitespace. ' -%}
"{{ text }}"
"{{ text | rstrip }}"
Code
{%- assign text = ' Some potions create whitespace. ' -%}
"{{ text }}"
"{{ text | rstrip }}"Output
" Some potions create whitespace. "
" Some potions create whitespace."
Output
" Some potions create whitespace. "
" Some potions create whitespace."Was this page helpful?