const_str
macro_rules! replace { ($str:literal, $from:literal, $to:literal) => { ... }; }
Replaces all matches of a pattern with another string literal.
See str::replace.
str::replace
assert_eq!("this is new", const_str::replace!("this is old", "old", "new"));