MCPcopy Index your code
hub / github.com/codeaashu/claude-code / countNewlines

Function countNewlines

src/utils/readEditContext.ts:153–157  ·  view source on GitHub ↗
(buf: Buffer, start: number, end: number)

Source from the content-addressed store, hash-verified

151}
152
153function countNewlines(buf: Buffer, start: number, end: number): number {
154 let n = 0
155 for (let i = start; i < end; i++) if (buf[i] === NL) n++
156 return n
157}
158
159/** Decode buf[0..len) to utf8, normalizing CRLF only if CR is present. */
160function normalizeCRLF(buf: Buffer, len: number): string {

Callers 2

scanForContextFunction · 0.85
sliceContextFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected