Skip to main content

toggle_comments

Function toggle_comments 

Source
pub fn toggle_comments(
    content: &str,
    ranges: &[LineRange],
    force_mode: Option<&str>,
) -> String
Expand description

Toggle comments in the specified line ranges. marker: comment prefix (e.g. "#", "//", "--"). Defaults to "#" if None. force_mode: Some("on") = always comment, Some("off") = always uncomment, None = invert.