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 text.
(
&self,
text: &'t [u8],
rep: R,
)
| 474 | /// See the documentation for `replace` for details on how to access |
| 475 | /// capturing group matches in the replacement text. |
| 476 | pub fn replace_all<'t, R: Replacer>( |
| 477 | &self, |
| 478 | text: &'t [u8], |
| 479 | rep: R, |
| 480 | ) -> Cow<'t, [u8]> { |
| 481 | self.replacen(text, 0, rep) |
| 482 | } |
| 483 | |
| 484 | /// Replaces at most `limit` non-overlapping matches in `text` with the |
| 485 | /// replacement provided. If `limit` is 0, then all non-overlapping matches |