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