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

Function wordEnd

src/extraction/languages/cpp-macro-methods.ts:211–216  ·  view source on GitHub ↗

The end of the identifier at `i`, or -1.

(text: string, i: number)

Source from the content-addressed store, hash-verified

209
210/** The end of the identifier at `i`, or -1. */
211function wordEnd(text: string, i: number): number {
212 if (!isWordStart(text.charCodeAt(i))) return -1;
213 let j = i + 1;
214 while (j < text.length && isWordChar(text.charCodeAt(j))) j++;
215 return j;
216}
217
218/**
219 * The qualified name starting at `i` that an argument list follows

Callers 3

qualifiedCallableAtFunction · 0.70
bodyOpenAfterFunction · 0.70
cppDefinitionHeadsFunction · 0.70

Calls 2

isWordStartFunction · 0.70
isWordCharFunction · 0.70

Tested by

no test coverage detected