1
Fork 0

Rollup merge of #23455 - Ryman:trim_matches_doc, r=steveklabnik

This commit is contained in:
Manish Goregaokar 2015-03-18 14:39:43 +05:30
commit e245e65ef8

View file

@ -931,11 +931,11 @@ pub trait StrExt: Index<RangeFull, Output = str> {
/// Returns a string with all pre- and suffixes that match a pattern repeatedly removed.
///
/// The pattern can be a simple `&str`, or a closure that determines the split.
/// The pattern can be any `DoubleEndedSearcher`, including a closure that determines the split.
///
/// # Examples
///
/// Simple `&str` patterns:
/// Simple `char` patterns:
///
/// ```
/// assert_eq!("11foo1bar11".trim_matches('1'), "foo1bar");