-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduce String::remove_matches
to remove all matches of a pattern in a string.
#50206
Labels
C-feature-request
Category: A feature request, i.e: not implemented / a PR.
T-libs-api
Relevant to the library API team, which will review and decide on the PR/issue.
Comments
frewsxcv
added
the
T-libs-api
Relevant to the library API team, which will review and decide on the PR/issue.
label
Apr 25, 2018
XAMPPRocky
added
the
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
label
Oct 2, 2018
frewsxcv
added
C-feature-request
Category: A feature request, i.e: not implemented / a PR.
and removed
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
labels
Jan 1, 2019
@rustbot claim |
Dylan-DPC-zz
pushed a commit
to Dylan-DPC-zz/rust
that referenced
this issue
Mar 18, 2021
…joshtriplett Implement String::remove_matches Closes rust-lang#50206. I lifted the function help from `@frewsxcv's` original PR (rust-lang#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.
Dylan-DPC-zz
pushed a commit
to Dylan-DPC-zz/rust
that referenced
this issue
Mar 18, 2021
…joshtriplett Implement String::remove_matches Closes rust-lang#50206. I lifted the function help from ``@frewsxcv's`` original PR (rust-lang#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.
Dylan-DPC-zz
pushed a commit
to Dylan-DPC-zz/rust
that referenced
this issue
Mar 19, 2021
…joshtriplett Implement String::remove_matches Closes rust-lang#50206. I lifted the function help from `@frewsxcv's` original PR (rust-lang#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.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
C-feature-request
Category: A feature request, i.e: not implemented / a PR.
T-libs-api
Relevant to the library API team, which will review and decide on the PR/issue.
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.This issue has been assigned to @jcotton42 via this comment.
The text was updated successfully, but these errors were encountered: