MCPcopy Create free account
hub / github.com/davidblewett/rure-python / replace_all

Method replace_all

regex/src/re_unicode.rs:523–529  ·  view source on GitHub ↗

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,
    )

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

replacenMethod · 0.45

Tested by

no test coverage detected