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

Function ExampleDocument_GetWordAfterCursorWithSpace

document_test.go:169–180  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

167}
168
169func ExampleDocument_GetWordAfterCursorWithSpace() {
170 d := &Document{
171 Text: `Hello! my name is c-bata.
172This is a example of Document component.
173`,
174 cursorPosition: len(`Hello! my name is c-bata.
175This is a`),
176 }
177 fmt.Println(d.GetWordAfterCursorWithSpace())
178 // Output:
179 // example
180}
181
182func ExampleDocument_GetWordBeforeCursorUntilSeparator() {
183 d := &Document{

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…