Skip to main content

strip_comments

Function strip_comments 

Source
pub fn strip_comments(s: &str) -> String
Expand description

Replaces // and /* */ comments with spaces, keeping every newline so byte offsets stay usable for line numbers.