GetWordAfterCursorUntilSeparatorIgnoreNextToCursor returns the word after the cursor. Unlike GetWordAfterCursor, it returns string containing space
(sep string)
| 121 | // GetWordAfterCursorUntilSeparatorIgnoreNextToCursor returns the word after the cursor. |
| 122 | // Unlike GetWordAfterCursor, it returns string containing space |
| 123 | func (d *Document) GetWordAfterCursorUntilSeparatorIgnoreNextToCursor(sep string) string { |
| 124 | x := d.TextAfterCursor() |
| 125 | return x[:d.FindEndOfCurrentWordUntilSeparatorIgnoreNextToCursor(sep)] |
| 126 | } |
| 127 | |
| 128 | // FindStartOfPreviousWord returns an index relative to the cursor position |
| 129 | // pointing to the start of the previous word. Return 0 if nothing was found. |