We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
String::retain
1 parent c19264f commit 7c442e5Copy full SHA for 7c442e5
src/doc/unstable-book/src/library-features/string-retain.md
src/liballoc/string.rs
@@ -1177,16 +1177,14 @@ impl String {
1177
/// # Examples
1178
///
1179
/// ```
1180
- /// #![feature(string_retain)]
1181
- ///
1182
/// let mut s = String::from("f_o_ob_ar");
1183
1184
/// s.retain(|c| c != '_');
1185
1186
/// assert_eq!(s, "foobar");
1187
1188
#[inline]
1189
- #[unstable(feature = "string_retain", issue = "43874")]
+ #[stable(feature = "string_retain", since = "1.26.0")]
1190
pub fn retain<F>(&mut self, mut f: F)
1191
where F: FnMut(char) -> bool
1192
{
0 commit comments