Uh oh!
There was an error while loading. Please reload this page.
Add str::strip_prefix and str::strip_suffix - #66735
Conversation
rust-highfive
commented
Nov 25, 2019
(rust_highfive has picked a reviewer for you, use r? to override) |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
rust-highfive
commented
Nov 26, 2019
The job Click to expand the log.I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
Alexendoo
commented
Dec 4, 2019
Ping from triage, any updates? @withoutboats |
Dylan-DPC-zz
commented
Dec 4, 2019
r? @KodrAus |
KodrAus
left a comment
There was a problem hiding this comment.
Naming wise it looks like we've got a few schemes going here: trim vs strip and start/end vs prefix/suffix.
Personally, I think strip_prefix and strip_suffix are nicely discoverable names, and this API is distinct enough from the trim ones in the way it operates that it doesn't seem necessary to me to make them consistent. They can sit out as distinct so users don't have to try compare signatures to see what makes them different.
So this looks good to me! I'll open up a tracking issue and circle back, but r=me if anybody beats me to it 🙂
Dylan-DPC-zz
commented
Dec 7, 2019
@KodrAus can I merge this? |
JohnCSimon
commented
Dec 14, 2019
Ping from triage - @KodrAus , see Dylan-DPC's comment |
CAD97
commented
Dec 14, 2019
This still needs the tracking issue created and to be linked up to, then r=@KodrAus. |
Dylan-DPC-zz
commented
Dec 14, 2019
Yes. But I don't want to keep the Pr hanging on an issue creation which can happen at a later stage as well |
Dylan-DPC-zz
commented
Dec 14, 2019
bors
commented
Dec 14, 2019
📌 Commit 4718e20 has been approved by |
dtolnay
commented
Dec 15, 2019
The PR can't land before tracking issue creation because the issue number needs to go inside the #[unstable(...)] attribute. We shouldn't be merging unstable methods with @bors r- |
Uh oh!
There was an error while loading. Please reload this page.
Dylan-DPC-zz
commented
Dec 15, 2019
Ah right, my bad 😆 |
KodrAus
commented
Dec 16, 2019
Whoops! Looks like I preempted my own dropping of the ball here. Thanks for opening the tracking issue @Dylan-DPC. @bors r+ |
bors
commented
Dec 16, 2019
📌 Commit 6176051 has been approved by |
bors
commented
Dec 16, 2019
🌲 The tree is currently closed for pull requests below priority 1000, this pull request will be tested once the tree is reopened |
Add str::strip_prefix and str::strip_suffix Introduces a counterpart for `Path::strip_prefix` on `str`. This was also discussed in https://internals.rust-lang.org/t/pre-pr-path-strip-prefix-counterpart-in-str/11364/.
Rollup of 7 pull requests Successful merges: - #65778 (Stabilize `std::{rc,sync}::Weak::{weak_count, strong_count}`) - #66570 (stabilize Result::map_or) - #66735 (Add str::strip_prefix and str::strip_suffix) - #66771 (Stabilize the `core::panic` module) - #67317 (fix type_name_of_val doc comment) - #67324 (Fix repetition in matches/mod.rs) - #67325 (cleanup with push_fake_read) Failed merges: r? @ghost
Rollup of 7 pull requests Successful merges: - #65778 (Stabilize `std::{rc,sync}::Weak::{weak_count, strong_count}`) - #66570 (stabilize Result::map_or) - #66735 (Add str::strip_prefix and str::strip_suffix) - #66771 (Stabilize the `core::panic` module) - #67317 (fix type_name_of_val doc comment) - #67324 (Fix repetition in matches/mod.rs) - #67325 (cleanup with push_fake_read) Failed merges: r? @ghost
Introduces a counterpart for
Path::strip_prefixonstr.This was also discussed in https://internals.rust-lang.org/t/pre-pr-path-strip-prefix-counterpart-in-str/11364/.