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

Function word_end

codegraph-kernel/src/ccpp/brace_scopes.rs:145–154  ·  view source on GitHub ↗

The end of the identifier at `i`, if one starts there.

(s: &[u8], i: usize)

Source from the content-addressed store, hash-verified

143
144/// The end of the identifier at `i`, if one starts there.
145fn word_end(s: &[u8], i: usize) -> Option<usize> {
146 if i >= s.len() || !is_word_start(s[i]) {
147 return None;
148 }
149 let mut j = i + 1;
150 while j < s.len() && is_word_char(s[j]) {
151 j += 1;
152 }
153 Some(j)
154}
155
156/// Past the string or character literal whose quote is at `i` (it stops at a newline).
157fn quoted_end(s: &[u8], i: usize) -> usize {

Callers 2

namespace_headFunction · 0.70
scanFunction · 0.70

Calls 3

is_word_startFunction · 0.85
is_word_charFunction · 0.85
lenMethod · 0.80

Tested by

no test coverage detected