()
| 128 | } |
| 129 | |
| 130 | func ExampleDocument_GetWordBeforeCursor() { |
| 131 | d := &Document{ |
| 132 | Text: `Hello! my name is c-bata. |
| 133 | This is a example of Document component. |
| 134 | `, |
| 135 | cursorPosition: len(`Hello! my name is c-bata. |
| 136 | This is a exam`), |
| 137 | } |
| 138 | fmt.Println(d.GetWordBeforeCursor()) |
| 139 | // Output: |
| 140 | // exam |
| 141 | } |
| 142 | |
| 143 | func ExampleDocument_GetWordAfterCursor() { |
| 144 | d := &Document{ |
nothing calls this directly
no test coverage detected
searching dependent graphs…