replace — replace one string for another
replace(s: string, old: string, new: string) -> string
The replace function substitutes all instances of the string old
that occur in string s
with the string new
.
echo '"oink oink oink"' | super -z -c 'yield replace(this, "oink", "moo")' -
=>
"moo moo moo"