String.replace
replace — Replaces a string with a string based on a string or regular expression.
Description
String.replace(mixed comparison, string with)
Parameters
Name | Description | Type | Default | Optional |
---|---|---|---|---|
comparison | String or regexp | mixed | No | |
with | String to replace with | string | No |
Return values
string primitive.
Examples
Example #1 – replace example