MCPcopy Index your code
hub / github.com/CodebuffAI/codebuff / findLineEnd

Function findLineEnd

cli/src/components/multiline-input.tsx:54–60  ·  view source on GitHub ↗
(text: string, cursor: number)

Source from the content-addressed store, hash-verified

52}
53
54function findLineEnd(text: string, cursor: number): number {
55 let pos = Math.max(0, Math.min(cursor, text.length))
56 while (pos < text.length && text[pos] !== '\n') {
57 pos++
58 }
59 return pos
60}
61
62function findPreviousWordBoundary(text: string, cursor: number): number {
63 let pos = Math.max(0, Math.min(cursor, text.length))

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected