replace(s: utf8, old: utf8, new: utf8) → utf8

Category: [strings](builtinsstrings)_

Replace every occurrence of a substring with another.

ParameterTypeDescriptionRemarks
sutf8The string to search.
oldutf8The substring to find.
newutf8The replacement substring.
returnsutf8The string with every match replaced.
wcl
replace("hello world", "world", "there")   // replace the matched substring → "hello there"