MCPcopy Create free account
hub / github.com/MaterializeInc/materialize / strip_comments

Function strip_comments

src/expr-parser/src/command.rs:47–55  ·  view source on GitHub ↗
(s: &str)

Source from the content-addressed store, hash-verified

45}
46
47fn strip_comments(s: &str) -> String {
48 let mut r = "".to_string();
49 for line in s.lines() {
50 let len = line.find("// {").unwrap_or(line.len());
51 r.push_str(line[0..len].trim_end());
52 r.push_str("\n");
53 }
54 r
55}

Callers 1

handle_roundtripFunction · 0.85

Calls 3

to_stringMethod · 0.45
findMethod · 0.45
lenMethod · 0.45

Tested by

no test coverage detected