MCPcopy Create free account
hub / github.com/FastLED/FastLED / strip_comments_preserving_lines

Function strip_comments_preserving_lines

ci/lint_cpp_rs/src/lib.rs:2576–2586  ·  view source on GitHub ↗
(lines: &[String])

Source from the content-addressed store, hash-verified

2574}
2575
2576fn strip_comments_preserving_lines(lines: &[String]) -> String {
2577 let mut in_block_comment = false;
2578 lines
2579 .iter()
2580 .map(|line| {
2581 let visible = strip_block_comments_from_line(line, &mut in_block_comment);
2582 split_line_comment(&visible).to_string()
2583 })
2584 .collect::<Vec<_>>()
2585 .join("\n")
2586}
2587
2588fn is_ascii_word_byte(byte: u8) -> bool {
2589 byte.is_ascii_alphanumeric() || byte == b'_'

Calls 4

split_line_commentFunction · 0.85
mapMethod · 0.45
to_stringMethod · 0.45

Tested by

no test coverage detected