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

Method expand

regex/src/re_bytes.rs:943–945  ·  view source on GitHub ↗

Expands all instances of `$name` in `replacement` to the corresponding capture group `name`, and writes them to the `dst` buffer given. `name` may be an integer corresponding to the index of the capture group (counted by order of opening parenthesis where `0` is the entire match) or it can be a name (consisting of letters, digits or underscores) corresponding to a named capture group. If `name`

(&self, replacement: &[u8], dst: &mut Vec<u8>)

Source from the content-addressed store, hash-verified

941 ///
942 /// To write a literal `$` use `$$`.
943 pub fn expand(&self, replacement: &[u8], dst: &mut Vec<u8>) {
944 expand_bytes(self, replacement, dst)
945 }
946
947 /// Returns the number of captured groups.
948 ///

Callers 1

replace_appendMethod · 0.45

Calls 1

expand_bytesFunction · 0.85

Tested by

no test coverage detected