reg_replace

Function reg_replace 

Source
pub fn reg_replace(
    src: &str,
    match_pattern: &str,
    rep: &str,
    global: bool,
    multiline: bool,
) -> String
Expand description

Replaces matches of a pattern with a replacement string

§Arguments

  • src - The source string
  • match_pattern - The pattern to match
  • rep - The replacement string
  • global - Whether to replace all occurrences or just the first one
  • multiline - Whether to enable multiline mode

§Returns

The string with replacements made