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 Title

The 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.

Try this syntax in the editor.