()
| 154 | } |
| 155 | |
| 156 | func ExampleDocument_GetWordBeforeCursorWithSpace() { |
| 157 | d := &Document{ |
| 158 | Text: `Hello! my name is c-bata. |
| 159 | This is a example of Document component. |
| 160 | `, |
| 161 | cursorPosition: len(`Hello! my name is c-bata. |
| 162 | This is a example `), |
| 163 | } |
| 164 | fmt.Println(d.GetWordBeforeCursorWithSpace()) |
| 165 | // Output: |
| 166 | // example |
| 167 | } |
| 168 | |
| 169 | func ExampleDocument_GetWordAfterCursorWithSpace() { |
| 170 | d := &Document{ |
nothing calls this directly
no test coverage detected
searching dependent graphs…