replace_ first
string | replace_first: string, string
returns string
Replaces the first instance of a substring inside a string with a given string.
{{ product.handle | replace_first: '-', ' ' }}
{{ product.handle | replace_first: '-', ' ' }}
{
"product": {
"handle": "komodo-dragon-scale"
}
}
Output
komodo dragon-scale
Was this page helpful?