MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / find

Function find

codegraph-kernel/src/ccpp/brace_scopes.rs:106–108  ·  view source on GitHub ↗
(src: &str, from: usize, pat: &str)

Source from the content-addressed store, hash-verified

104 s.get(i).copied().unwrap_or(0)
105}
106fn find(src: &str, from: usize, pat: &str) -> Option<usize> {
107 src.get(from..).and_then(|rest| rest.find(pat)).map(|k| from + k)
108}
109
110/// The end of a `//` comment starting at `i`: its newline (a `\` before it continues the comment).
111fn line_comment_end(src: &str, mut i: usize) -> usize {

Callers 4

line_comment_endFunction · 0.70
skip_blankFunction · 0.70
namespace_headFunction · 0.70
scanFunction · 0.70

Calls 2

mapMethod · 0.80
getMethod · 0.65

Tested by

no test coverage detected