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