diff --git a/src/libcore/str/mod.rs b/src/libcore/str/mod.rs index 624c3638df5..3862b4a2eb0 100644 --- a/src/libcore/str/mod.rs +++ b/src/libcore/str/mod.rs @@ -710,6 +710,37 @@ fn last(self) -> Option { fn nth(&mut self, n: usize) -> Option { self.0.nth(n) } + + #[inline] + fn all(&mut self, f: F) -> bool where F: FnMut(Self::Item) -> bool { + self.0.all(f) + } + + #[inline] + fn any(&mut self, f: F) -> bool where F: FnMut(Self::Item) -> bool { + self.0.any(f) + } + + #[inline] + fn find

(&mut self, predicate: P) -> Option where + P: FnMut(&Self::Item) -> bool + { + self.0.find(predicate) + } + + #[inline] + fn position

(&mut self, predicate: P) -> Option where + P: FnMut(Self::Item) -> bool + { + self.0.position(predicate) + } + + #[inline] + fn rposition

(&mut self, predicate: P) -> Option where + P: FnMut(Self::Item) -> bool + { + self.0.rposition(predicate) + } } #[stable(feature = "rust1", since = "1.0.0")] @@ -718,6 +749,13 @@ impl<'a> DoubleEndedIterator for Bytes<'a> { fn next_back(&mut self) -> Option { self.0.next_back() } + + #[inline] + fn rfind

(&mut self, predicate: P) -> Option where + P: FnMut(&Self::Item) -> bool + { + self.0.rfind(predicate) + } } #[stable(feature = "rust1", since = "1.0.0")]