- 
                Notifications
    You must be signed in to change notification settings 
- Fork 13.9k
Open
Labels
C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCT-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.disposition-mergeThis issue / PR is in PFCP or FCP with a disposition to merge it.This issue / PR is in PFCP or FCP with a disposition to merge it.finished-final-comment-periodThe final comment period is finished for this PR / Issue.The final comment period is finished for this PR / Issue.to-announceAnnounce this issue on triage meetingAnnounce this issue on triage meeting
Description
Feature gate: #![feature(substr_range)]
This is a tracking issue for str::substr_range, slice::subslice_range, and slice::element_offset as described in this ACP.
These methods can be used for error handling and to extend str::lines, str::split, slice::split, and other related methods.
Public API
impl str {
    fn substr_range(&self, substr: &str) -> Option<Range<usize>>;
}
impl<T> [T] {
    fn subslice_range(&self, subslice: &[T]) -> Option<Range<usize>>;
    fn element_offset(&self, element: &T) -> Option<usize>;
}Steps / History
- ACP
- Implementation: Add elem_offset and related methods #126770
-  Rename elem_offsettoelement_offset#132830
- Final comment period (FCP)1
-  Stabilization PR: Stabilize substr_rangeand related methods #141266
Unresolved Questions
Footnotes
Kolsky, wmstack, kornelski, Nicholas-Hein, joseluis and 2 moreKolsky and reneleonhardt
Metadata
Metadata
Assignees
Labels
C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCT-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.disposition-mergeThis issue / PR is in PFCP or FCP with a disposition to merge it.This issue / PR is in PFCP or FCP with a disposition to merge it.finished-final-comment-periodThe final comment period is finished for this PR / Issue.The final comment period is finished for this PR / Issue.to-announceAnnounce this issue on triage meetingAnnounce this issue on triage meeting