Function reinda::util::replace_many_with

source ยท
pub fn replace_many_with<N, T, R>(src: &[u8], needles: N, f: R) -> Vec<u8>
where N: IntoIterator<Item = T>, T: AsRef<[u8]>, R: FnMut(usize, &[u8], &mut Vec<u8>),
Expand description

Replaces multiple occurences in the given byte slice, with the replacement being defined by the given function.

This is more effient than calling .replace multiple times. This function is the more powerful version of replace_many.