Skip to main content

replace_with_placeholders

Function replace_with_placeholders 

Source
pub fn replace_with_placeholders(
    s: &str,
    pattern: &str,
    placeholder: &str,
) -> (String, HashMap<String, String>)
Expand description

Replace regex matches with placeholders, returning the modified string and a map of placeholder → original.