We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8641c95 commit 6e8cf93Copy full SHA for 6e8cf93
src/libcore/str.rs
@@ -1761,6 +1761,12 @@ impl extensions for str {
1761
#[doc = "Returns true if one string contains another"]
1762
#[inline]
1763
fn contains(needle: str) -> bool { contains(self, needle) }
1764
+ #[doc = "Iterate over the bytes in a string"]
1765
+ #[inline]
1766
+ fn each(it: fn(u8) -> bool) { each(self, it) }
1767
+ #[doc = "Iterate over the chars in a string"]
1768
1769
+ fn each_char(it: fn(char) -> bool) { each_char(self, it) }
1770
#[doc = "Returns true if one string ends with another"]
1771
1772
fn ends_with(needle: str) -> bool { ends_with(self, needle) }
0 commit comments