Skip to content

remove_last

Removes the last occurrence of a string.

string | remove_last: string

string

Liquid
{{ 'a-b-c' | remove_last: '-' }}
Output
a-bc

Shopify: Same as Shopify.

Since theme platform 1.0.

Was this page helpful?