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

Method getLineStart

src/extraction/liquid-extractor.ts:527–534  ·  view source on GitHub ↗

* Get the character index of the start of a line

(lineNumber: number)

Source from the content-addressed store, hash-verified

525 * Get the character index of the start of a line
526 */
527 private getLineStart(lineNumber: number): number {
528 const lines = this.source.split('\n');
529 let index = 0;
530 for (let i = 0; i < lineNumber - 1 && i < lines.length; i++) {
531 index += lines[i]!.length + 1; // +1 for newline
532 }
533 return index;
534 }
535}

Callers 5

extractSchemaMethod · 0.95
addVariableMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected