Skip to main content

regex_replacen_into

Function regex_replacen_into 

Source
pub fn regex_replacen_into<R>(
    reg: &Regex,
    s: &str,
    limit: usize,
    rep: R,
    buf: &mut String,
) -> bool
where R: Replacer,
Available on crate feature polars-ops only.
Expand description

Write s into buf with the first limit matches of reg replaced by rep (all matches if limit is 0). Returns false if nothing matched; buf is then not filled.

This is [Regex::replacen] writing into a reused buffer.