replace
Replaces characters within a string.
Description
The replace
function returns a new string where occurrences of pattern
in x
are replaced with replacement
, up to max
times. If max
is omitted, all
occurrences are replaced.
x: string
The subject to replace the action on.
pattern: string
The pattern to replace in x
.
replacement: string
The replacement value for pattern
.
max = string (optional)
The maximum number of replacements to perform.