Function voca_rs::manipulate::replace_all
source · Expand description
Replaces all matches of pattern
with replacement
.
Arguments
subject
- The string to verify.pattern
- The pattern which match is replaced. All matches are replaced.replacement
- The string which replacespattern
match.
Example
use voca_rs::*;
manipulate::replace_all("swan", "wa", "u");
// => "sun"
manipulate::replace_all("domestic duck", "d", "D");
// => "Domestic Duck"
manipulate::replace_all("Café del Mar café", "é", "e");
// => "Cafe del Mar cafe"
use voca_rs::Voca;
"swan"._replace_all("wa", "u");
// => "sun"