replace_last

v10.2.0

把字符串中出现的最后一个指定子字符串替换为另一个字符串。

输入

{{ "Take my protein pills and put my helmet on" | replace_last: "my", "your" }}

输出

Take my protein pills and put your helmet on