Skip to content
Log in

replace_first - Liquid Filter Reference

On this page

Description

Replaces only the first occurrence of the first argument in a string with the second argument.

Property Value
Return Type string
Category text

Examples

liquid {{ "Baby shark do do do do" | replace_first: "do", "oi" }}

Output: Baby shark oi do do do

Was this article helpful?

Was this article helpful?