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

Function quotedEnd

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

Past the string or character literal whose quote is at `i`.

(text: string, i: number)

Source from the content-addressed store, hash-verified

195
196/** Past the string or character literal whose quote is at `i`. */
197function quotedEnd(text: string, i: number): number {
198 const quote = text[i];
199 let j = i + 1;
200 while (j < text.length && text[j] !== quote && text[j] !== '\n') j += text[j] === '\\' ? 2 : 1;
201 return Math.min(text.length, j + 1);
202}
203
204/** Past the blanks at `i`. */
205function skipBlank(text: string, i: number): number {

Callers 5

matchingFunction · 0.70
cppDefinitionHeadsFunction · 0.70
cppMacroInvocationsFunction · 0.70
withoutLineCommentFunction · 0.70
cppCodeScanFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected