lstrip
Remove all leading whitespace, tabs, and newline characters from the left side of a string.
Syntax
{{ string | lstrip }}Example
{% assign text = " Clean Title" %}{{ text | lstrip }}Output
Clean TitleThe lstrip filter strips all leading whitespace characters—including spaces, tabs, and newlines—from the beginning of a string while leaving internal and trailing whitespace intact.
In programmatic keyword generation, lstrip cleans up accidental indentations introduced during CSV importing or multiline template tags. For example: {{ row.office_name | lstrip }}. This prevents misaligned inline text and ensures brand names sit flush against adjacent icons or borders.
Filters
- abs
- append
- at_least
- at_most
- capitalize
- ceil
- compact
- concat
- date
- default
- divided_by
- downcase
- escape
- escape_once
- first
- floor
- join
- last
- lstrip
- map
- minus
- modulo
- newline_to_br
- plus
- prepend
- remove
- remove_first
- replace
- replace_first
- reverse
- round
- rstrip
- size
- slice
- sort
- sort_natural
- split
- strip
- strip_html
- strip_newlines
- times
- truncate
- truncatewords
- uniq
- upcase
- url_decode
- url_encode
- where
- raw
- slugify
- number_format
