Uh oh!
There was an error while loading. Please reload this page.
Add String::replace_first and String::replace_last - #97977
Conversation
rust-highfive
commented
Jun 11, 2022
Hey! It looks like you've submitted a new PR for the library teams! If this PR contains changes to any Examples of
|
rust-highfive
commented
Jun 11, 2022
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @kennytm (or someone else) soon. Please see the contribution instructions for more information. |
WilliamVenner
commented
Jun 11, 2022
For now I have manually specified the types in the test and doctest, but these should of course be omitted once the issue is resolved. |
WilliamVenner
commented
Jun 11, 2022
@rustbot label +T-libs-api -T-libs |
This comment has been minimized.
This comment has been minimized.
004561b to
eb1fa3cCompare
This comment has been minimized.
This comment has been minimized.
@WilliamVenner FYI: when a PR is ready for review, send a message containing @rustbot author |
JohnCSimon
commented
Aug 13, 2022
@WilliamVenner @rustbot label: +S-inactive |
WilliamVenner
commented
Aug 13, 2022
??? This is blocked by #98941@JohnCSimon |
@WilliamVenner sorry - my mistake, reopened. |
This comment has been minimized.
This comment has been minimized.
bors
commented
Sep 4, 2022
☔ The latest upstream changes (presumably #93455) made this pull request unmergeable. Please resolve the merge conflicts. |
https://github.com/zachs18/rust/tree/string_replace_in_place_rebase |
85d91c6 to
8dd1b5eCompareWilliamVenner
commented
Sep 19, 2024
@zachs18 Thank you 🙂 |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
WilliamVenner
commented
Sep 19, 2024
@rustbot label: -S-blocked |
rust-log-analyzer
commented
Sep 19, 2024
The job Click to see the possible cause of the failure (guessed by this bot) |
bors
commented
Sep 22, 2024
☔ The latest upstream changes (presumably #130674) made this pull request unmergeable. Please resolve the merge conflicts. |
alex-semenyuk
commented
Nov 5, 2024
@WilliamVenner |
alex-semenyuk
commented
Dec 14, 2024
@WilliamVenner |
…base, r=joshtriplett Add `String::replace_first` and `String::replace_last` Rebase of rust-lang#97977 (cc `@WilliamVenner)` > Convenience methods that use `match_indices` and `replace_range` to efficiently replace a substring in a string without reallocating, if capacity (and the implementation of `Vec::splice`) allows. The intra-doc link to `str::replacen` is a direct url-based link to `str::replacen` in `std`'s docs to work around rust-lang#98941. This means that when building only `alloc`'s docs (and not `std`'s), it will be a broken link. There is precedent for this e.g. in [`core::hint::spin_loop`](https://doc.rust-lang.org/nightly/src/core/hint.rs.html#214) which links to `std::thread::yield_now` using a [url-based link](https://github.com/rust-lang/rust/blob/master/library/core/src/hint.rs#L265) and thus is a dead link when only building `core`'s docs. ACP: rust-lang/libs-team#506
…base, r=joshtriplett Add `String::replace_first` and `String::replace_last` Rebase of rust-lang#97977 (cc `@WilliamVenner)` > Convenience methods that use `match_indices` and `replace_range` to efficiently replace a substring in a string without reallocating, if capacity (and the implementation of `Vec::splice`) allows. The intra-doc link to `str::replacen` is a direct url-based link to `str::replacen` in `std`'s docs to work around rust-lang#98941. This means that when building only `alloc`'s docs (and not `std`'s), it will be a broken link. There is precedent for this e.g. in [`core::hint::spin_loop`](https://doc.rust-lang.org/nightly/src/core/hint.rs.html#214) which links to `std::thread::yield_now` using a [url-based link](https://github.com/rust-lang/rust/blob/master/library/core/src/hint.rs#L265) and thus is a dead link when only building `core`'s docs. ACP: rust-lang/libs-team#506
Rollup merge of #134316 - zachs18:string_replace_in_place_rebase, r=joshtriplett Add `String::replace_first` and `String::replace_last` Rebase of #97977 (cc `@WilliamVenner)` > Convenience methods that use `match_indices` and `replace_range` to efficiently replace a substring in a string without reallocating, if capacity (and the implementation of `Vec::splice`) allows. The intra-doc link to `str::replacen` is a direct url-based link to `str::replacen` in `std`'s docs to work around #98941. This means that when building only `alloc`'s docs (and not `std`'s), it will be a broken link. There is precedent for this e.g. in [`core::hint::spin_loop`](https://doc.rust-lang.org/nightly/src/core/hint.rs.html#214) which links to `std::thread::yield_now` using a [url-based link](https://github.com/rust-lang/rust/blob/master/library/core/src/hint.rs#L265) and thus is a dead link when only building `core`'s docs. ACP: rust-lang/libs-team#506
…base, r=joshtriplett Add `String::replace_first` and `String::replace_last` Rebase of rust-lang#97977 (cc `@WilliamVenner)` > Convenience methods that use `match_indices` and `replace_range` to efficiently replace a substring in a string without reallocating, if capacity (and the implementation of `Vec::splice`) allows. The intra-doc link to `str::replacen` is a direct url-based link to `str::replacen` in `std`'s docs to work around rust-lang#98941. This means that when building only `alloc`'s docs (and not `std`'s), it will be a broken link. There is precedent for this e.g. in [`core::hint::spin_loop`](https://doc.rust-lang.org/nightly/src/core/hint.rs.html#214) which links to `std::thread::yield_now` using a [url-based link](https://github.com/rust-lang/rust/blob/master/library/core/src/hint.rs#L265) and thus is a dead link when only building `core`'s docs. ACP: rust-lang/libs-team#506
…base, r=joshtriplett Add `String::replace_first` and `String::replace_last` Rebase of rust-lang#97977 (cc `@WilliamVenner)` > Convenience methods that use `match_indices` and `replace_range` to efficiently replace a substring in a string without reallocating, if capacity (and the implementation of `Vec::splice`) allows. The intra-doc link to `str::replacen` is a direct url-based link to `str::replacen` in `std`'s docs to work around rust-lang#98941. This means that when building only `alloc`'s docs (and not `std`'s), it will be a broken link. There is precedent for this e.g. in [`core::hint::spin_loop`](https://doc.rust-lang.org/nightly/src/core/hint.rs.html#214) which links to `std::thread::yield_now` using a [url-based link](https://github.com/rust-lang/rust/blob/master/library/core/src/hint.rs#L265) and thus is a dead link when only building `core`'s docs. ACP: rust-lang/libs-team#506
…base, r=joshtriplett Add `String::replace_first` and `String::replace_last` Rebase of rust-lang#97977 (cc `@WilliamVenner)` > Convenience methods that use `match_indices` and `replace_range` to efficiently replace a substring in a string without reallocating, if capacity (and the implementation of `Vec::splice`) allows. The intra-doc link to `str::replacen` is a direct url-based link to `str::replacen` in `std`'s docs to work around rust-lang#98941. This means that when building only `alloc`'s docs (and not `std`'s), it will be a broken link. There is precedent for this e.g. in [`core::hint::spin_loop`](https://doc.rust-lang.org/nightly/src/core/hint.rs.html#214) which links to `std::thread::yield_now` using a [url-based link](https://github.com/rust-lang/rust/blob/master/library/core/src/hint.rs#L265) and thus is a dead link when only building `core`'s docs. ACP: rust-lang/libs-team#506
Convenience methods that use
match_indicesandreplace_rangeto efficiently replace a substring in a string without reallocating, if capacity (and the implementation ofVec::splice) allows.