Starts the search for a misspelled word in a string starting at specified offset within the string.
- macOS 10.0+
The string object containing the words to spellcheck.
The offset within
stringat which to begin spellchecking.
The language of the words in the string. If
nil, or if you obtain the value by sending
self, the current selection in the Spelling panel’s pop-up menu is used. Do not pass in an empty string for
trueto indicate that spell checking should continue at the beginning of the string when the end of the string is reached;
falseto indicate that spellchecking should stop at the end of the document.
An identifier unique within the application used to inform the spell checker which document that text is associated, potentially for many purposes, not necessarily just for ignored words. A value of 0 can be passed in for text not associated with a particular document.
Returns by indirection a count of the words spell-checked up to and including the first error (if any), or -1 if the spell checker fails or does not support word counting. Specify
NULLif you do not want this word count.
The range of the first misspelled word and optionally (and by reference) the count of words spellchecked in the string in