Fix documentation for StrExt::trim_matches

This commit is contained in:
Kevin Butler 2015-03-17 20:23:42 +00:00
parent bfac337daa
commit 34c48db837

View File

@ -923,11 +923,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");