Skip to content

Latest commit

 

History

History
24 lines (17 loc) · 438 Bytes

replace.md

File metadata and controls

24 lines (17 loc) · 438 Bytes

Function

replace — replace one string for another

Synopsis

replace(s: string, old: string, new: string) -> string

Description

The replace function substitutes all instances of the string old that occur in string s with the string new.

Example:

echo '"oink oink oink"' | super -z -c 'yield replace(this, "oink", "moo")' -

=>

"moo moo moo"