Macro const_str::replace[][src]

macro_rules! replace {
    ($s : literal, $from : literal, $to : literal) => { ... };
}
Expand description

Replaces all matches of a pattern with another string literal.

See str::replace.

Examples

assert_eq!("this is new", const_str::replace!("this is old", "old", "new"));