- :string
- or :nothing
replace
replace every matched substring/s by given replacement string and return result
Parameters
replace string :string :literal match :string :regex :block replacement :string :block
Returns
Examples
copyreplace "hello" "l" "x" ; => "hexxo"
copystr: "hello" replace 'str "l" "x" ; str: "hexxo"
copyreplace "hello" ["h" "l"] "x" ; => "xexxo" replace "hello" ["h" "o"] ["x" "z"] ; => "xellz"