Rollup merge of #23455 - Ryman:trim_matches_doc, r=steveklabnik
This commit is contained in:
commit
e245e65ef8
1 changed files with 2 additions and 2 deletions
|
@ -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");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue