MCPcopy Index your code
hub / github.com/c-bata/go-prompt / ExampleDocument_GetWordBeforeCursorWithSpace

Function ExampleDocument_GetWordBeforeCursorWithSpace

document_test.go:156–167  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

154}
155
156func ExampleDocument_GetWordBeforeCursorWithSpace() {
157 d := &Document{
158 Text: `Hello! my name is c-bata.
159This is a example of Document component.
160`,
161 cursorPosition: len(`Hello! my name is c-bata.
162This is a example `),
163 }
164 fmt.Println(d.GetWordBeforeCursorWithSpace())
165 // Output:
166 // example
167}
168
169func ExampleDocument_GetWordAfterCursorWithSpace() {
170 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…