Skip to content

replace_first

Replaces the first occurrence of a string.

string | replace_first: find, replace_with

string

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

Shopify: Same as Shopify.

Since theme platform 1.0.

Was this page helpful?