devela::_dep::const_str

Macro replace

macro_rules! replace {
    ($s: expr, $from: expr, $to: expr) => { ... };
}
Available on crate feature dep_const_str only.
Expand description

Replaces all matches of a pattern with another string slice.

See str::replace.

The pattern type must be one of

ยงExamples

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