Returns the index of the first character of the word after or before the given index.
- macOS 10.0+
The index in the attribute string.
trueif the search should be forward, otherwise
true if this is the first character after
index that begins a word; if
false, it’s the first character before
index that begins a word, whether
index is located within a word or not.
index lies at either end of the string and the search direction would progress past that end, it’s returned unchanged.
This method is intended for moving the insertion point during editing, not for linguistic analysis or parsing of text.
index lies beyond the end of the receiver’s characters.