Replace all occurrences of old_str with new_str.
Example:
assert (Strings.replace ("hello world", "world", "vala") == "hello vala");
| s |
the original string. |
| old_str |
the substring to find. |
| new_str |
the replacement string. |
|
string with all replacements applied. |