Skip to main content

rstrip

string | rstrip
returns string

Strips all whitespace from the right of a string.

{%- assign text = ' Some potions create whitespace. ' -%}

"{{ text }}"
"{{ text | rstrip }}"

Output

" Some potions create whitespace. "
" Some potions create whitespace."
Was this page helpful?