]> git.lizzy.rs Git - rust.git/commit - src/tools/miri
Auto merge of #71780 - jcotton42:string_remove_matches, r=joshtriplett
authorbors <bors@rust-lang.org>
Fri, 19 Mar 2021 00:47:37 +0000 (00:47 +0000)
committerbors <bors@rust-lang.org>
Fri, 19 Mar 2021 00:47:37 +0000 (00:47 +0000)
commiteb95acea8aeaeef834214eaffb15d64095fe9271
tree1e13b205c657ee7584e35bf301bace177ef64bc5
parent1705a7d64b833d1c4b69958b0627bd054e6d764b
parenta2571cfc8b6f5cf5d8d2e7075ac4809aceae9541
Auto merge of #71780 - jcotton42:string_remove_matches, r=joshtriplett

Implement String::remove_matches

Closes #50206.

I lifted the function help from `@frewsxcv's` original PR (#50015), hope they don't mind.

I'm also wondering whether it would be useful for `remove_matches` to collect up the removed substrings into a `Vec` and return them, right now they're just overwritten by the copy and lost.
library/alloc/src/string.rs
library/alloc/tests/lib.rs