[][src]Function voca_rs::manipulate::replace

pub fn replace(subject: &str, pattern: &str, replacement: &str) -> String

Replaces the matches of pattern with replacement.

Arguments

Example

use voca_rs::*;
manipulate::replace("swan", "wa", "u");
// => "sun"
manipulate::replace("domestic duck", "d", "D");
// => "Domestic duck"
manipulate::replace("Café del Mar cafe\u{0301}", "é", "e");
// => "Cafe del Mar café"
use voca_rs::Voca;
"swan"._replace("wa", "u");
// => "sun"