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.
1 parent b7930d9 commit ab5c330Copy full SHA for ab5c330
src/libcollections/str.rs
@@ -435,12 +435,9 @@ pub trait StrExt: Index<FullRange, Output = str> {
435
/// # Examples
436
///
437
/// ```rust
438
- /// let s = "Do you know the muffin man,
439
- /// The muffin man, the muffin man, ...".to_string();
+ /// let s = "this is old";
440
441
- /// assert_eq!(s.replace("muffin man", "little lamb"),
442
- /// "Do you know the little lamb,
443
- /// The little lamb, the little lamb, ...".to_string());
+ /// assert_eq!(s.replace("old", "new"), "this is new");
444
445
/// // not found, so no change.
446
/// assert_eq!(s.replace("cookie monster", "little lamb"), s);
0 commit comments