Function build_modified_source

Source
pub fn build_modified_source(
    original: &str,
    range: Range<usize>,
    replacement: &str,
) -> String
Expand description

Build modified source with range replacement

Creates a new source string by replacing the specified range with new text.

§Arguments

  • original - The original source text
  • range - The byte range to replace
  • replacement - The text to insert in place of the range

§Returns

A new string with the replacement applied