-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-iteratorsArea: IteratorsArea: IteratorsC-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.
Description
Implemented in #49987:
impl str {
pub fn split_ascii_whitespace(&self) -> SplitAsciiWhitespace {…}
}
#[derive(Clone, Debug)]
pub struct SplitAsciiWhitespace<'a> {…}
impl<'a> Iterator for SplitAsciiWhitespace<'a> {
type Item = &'a str;
…
}
impl<'a> DoubleEndedIterator for SplitAsciiWhitespace<'a> {…}
impl<'a> FusedIterator for SplitAsciiWhitespace<'a> {}
Original feature request:
Considering how is_ascii_whitespace
is now available on libcore, it makes sense to provide this too.
I'll provide a PR at some point if this seems reasonable; a lot of code that needs to split on whitespace only needs to split on ASCII whitespace, which is considerably faster.
petrochenkov, leonardo-m, shingtaklam1324, I60R and thomcc
Metadata
Metadata
Assignees
Labels
A-iteratorsArea: IteratorsArea: IteratorsC-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.