We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 2a2b2f4 + f69d4d4 commit 079a6e4Copy full SHA for 079a6e4
src/liballoc/str.rs
@@ -1734,7 +1734,7 @@ impl str {
1734
/// A more complex pattern, using a closure:
1735
///
1736
/// ```
1737
- /// assert_eq!("1fooX".trim_left_matches(|c| c == '1' || c == 'X'), "fooX");
+ /// assert_eq!("1fooX".trim_right_matches(|c| c == '1' || c == 'X'), "1foo");
1738
1739
#[stable(feature = "rust1", since = "1.0.0")]
1740
pub fn trim_right_matches<'a, P: Pattern<'a>>(&'a self, pat: P) -> &'a str
0 commit comments