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: '-', ' ' }}
Code
{{ product.handle | replace_first: '-', ' ' }}Data
{
"product": {
"handle": "komodo-dragon-scale"
}
}Output
komodo dragon-scale
Output
komodo dragon-scaleWas this page helpful?