MCPcopy
hub / github.com/c-bata/go-prompt / GetEndOfLinePosition

Method GetEndOfLinePosition

document.go:433–435  ·  view source on GitHub ↗

GetEndOfLinePosition returns relative position for the end of this line.

()

Source from the content-addressed store, hash-verified

431
432// GetEndOfLinePosition returns relative position for the end of this line.
433func (d *Document) GetEndOfLinePosition() int {
434 return len([]rune(d.CurrentLineAfterCursor()))
435}
436
437func (d *Document) leadingWhitespaceInCurrentLine() (margin string) {
438 trimmed := strings.TrimSpace(d.CurrentLine())

Callers 2

JoinNextLineMethod · 0.80

Calls 1

Tested by 1