Replaces all non-overlapping matches in `text` with the replacement provided. This is the same as calling `replacen` with `limit` set to `0`. See the documentation for `replace` for details on how to access capturing group matches in the replacement string.
(
&self,
text: &'t str,
rep: R,
)
| 521 | /// See the documentation for `replace` for details on how to access |
| 522 | /// capturing group matches in the replacement string. |
| 523 | pub fn replace_all<'t, R: Replacer>( |
| 524 | &self, |
| 525 | text: &'t str, |
| 526 | rep: R, |
| 527 | ) -> Cow<'t, str> { |
| 528 | self.replacen(text, 0, rep) |
| 529 | } |
| 530 | |
| 531 | /// Replaces at most `limit` non-overlapping matches in `text` with the |
| 532 | /// replacement provided. If `limit` is 0, then all non-overlapping matches |