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

Function find_close_paren

ci/lint_cpp_rs/src/lib.rs:3244–3257  ·  view source on GitHub ↗
(text: &str, open_pos: usize)

Source from the content-addressed store, hash-verified

3242}
3243
3244fn find_close_paren(text: &str, open_pos: usize) -> Option<usize> {
3245 let mut depth = 1_i32;
3246 for (offset, ch) in text[open_pos + 1..].char_indices() {
3247 if ch == '(' {
3248 depth += 1;
3249 } else if ch == ')' {
3250 depth -= 1;
3251 if depth == 0 {
3252 return Some(open_pos + 1 + offset);
3253 }
3254 }
3255 }
3256 None
3257}
3258
3259fn find_close_paren_multiline(
3260 lines: &[String],

Callers 1

classify_noexcept_lineFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected