# replace
Replace all occurrences of a substring.
## Syntax
[replace $string $old $new]
## Examples
[replace "hello" "l" "r"] # "herro" [replace "foo bar foo" "foo" "baz"] # "baz bar baz"
## Returns
New string with all occurrences replaced.
## See Also
`trim`, `split`, `contains`, `regex`