That’s the method for an array. You can’t do that in a string (and it turns out, making a vector of substitution pairs won’t help):
gustaphe
4
Related topics
| Topic | Replies | Views | Activity | |
|---|---|---|---|---|
| Replace two substrings in a string with the same `replace` call? | 2 | 358 | October 20, 2021 | |
| Perform multiple replacements on a string in a single pass | 19 | 10064 | January 18, 2022 | |
| Replacing multiple strings errors | 11 | 4649 | March 13, 2019 | |
| Why isn't string replace variadic? | 1 | 284 | May 28, 2021 | |
| Replace behaving strange? | 6 | 862 | May 31, 2019 |