MCPcopy Create free account
hub / github.com/c-bata/go-prompt / ExampleDocument_CursorPositionCol

Function ExampleDocument_CursorPositionCol

document_test.go:48–60  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

46}
47
48func ExampleDocument_CursorPositionCol() {
49 d := &Document{
50 Text: `Hello! my name is c-bata.
51This is a example of Document component.
52This component has texts displayed in terminal and cursor position.
53`,
54 cursorPosition: len(`Hello! my name is c-bata.
55This is a exam`),
56 }
57 fmt.Println("CursorPositionCol", d.CursorPositionCol())
58 // Output:
59 // CursorPositionCol 14
60}
61
62func ExampleDocument_TextBeforeCursor() {
63 d := &Document{

Callers

nothing calls this directly

Calls 1

CursorPositionColMethod · 0.95

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…