Replaces all occurrences of a substring with a replacement string.
replace('hello world', 'world', 'there') → 'hello there' replace('aaa', 'a', 'b') → 'bbb' replace('hello', 'xyz', 'abc') → 'hello'