replace_first
将字符串中出现的第一个参数替换为第二个参数。
输入
{% assign my_string = "Take my protein pills and put my helmet on" %}
{{ my_string | replace_first: "my", "your" }}
输出
Take your protein pills and put my helmet on
将字符串中出现的第一个参数替换为第二个参数。
输入
{% assign my_string = "Take my protein pills and put my helmet on" %}
{{ my_string | replace_first: "my", "your" }}
输出
Take your protein pills and put my helmet on