additional docs example for replace **all** of str
This commit is contained in:
parent
be16c6166f
commit
7c861cf0ad
@ -271,6 +271,7 @@ impl str {
|
||||
/// let s = "this is old";
|
||||
///
|
||||
/// assert_eq!("this is new", s.replace("old", "new"));
|
||||
/// assert_eq!("than an old", s.replace("is", "an"));
|
||||
/// ```
|
||||
///
|
||||
/// When the pattern doesn't match:
|
||||
|
Loading…
x
Reference in New Issue
Block a user