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

Method TextAfterCursor

document.go:69–72  ·  view source on GitHub ↗

TextAfterCursor returns the text after the cursor.

()

Source from the content-addressed store, hash-verified

67
68// TextAfterCursor returns the text after the cursor.
69func (d *Document) TextAfterCursor() string {
70 r := []rune(d.Text)
71 return string(r[d.cursorPosition:])
72}
73
74// GetWordBeforeCursor returns the word before the cursor.
75// If we have whitespace before the cursor this returns an empty string.

Calls

no outgoing calls