Skip to content

replace_last

Replaces the last occurrence of a string.

string | replace_last: find, replace_with

string

Liquid
{{ '1-2-3' | replace_last: '-', '/' }}
Output
1-2/3

Shopify: Same as Shopify.

Since theme platform 1.0.

Was this page helpful?