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 f6dd25b + ab5c330 commit 4c25687Copy full SHA for 4c25687
src/libcollections/str.rs
@@ -444,12 +444,9 @@ pub trait StrExt: Index<RangeFull, Output = str> {
444
/// # Examples
445
///
446
/// ```rust
447
- /// let s = "Do you know the muffin man,
448
- /// The muffin man, the muffin man, ...".to_string();
+ /// let s = "this is old";
449
450
- /// assert_eq!(s.replace("muffin man", "little lamb"),
451
- /// "Do you know the little lamb,
452
- /// The little lamb, the little lamb, ...".to_string());
+ /// assert_eq!(s.replace("old", "new"), "this is new");
453
454
/// // not found, so no change.
455
/// assert_eq!(s.replace("cookie monster", "little lamb"), s);
0 commit comments