Closed
Description
Like replace(..., "")
, but doesn't result in any allocations.
I started implementing this in #50015 but got stuck, mainly because of limitations in the Pattern
APIs.
let mut s = String::from("Trees are not green, the sky is not blue.");
s.remove_matches("not ");
assert_eq!("Trees are green, the sky is blue.", s);
This issue has been assigned to @jcotton42 via this comment.