checkGrammar(of:startingAt:language:wrap:inSpellDocumentWithTag:details:)
Initiates a grammatical analysis of a given string.
Declaration
func checkGrammar(of stringToCheck: String, startingAt startingOffset: Int, language: String?, wrap wrapFlag: Bool, inSpellDocumentWithTag tag: Int, details: AutoreleasingUnsafeMutablePointer<NSArray?>?) -> NSRangeParameters
- stringToCheck:
String to analyze.
- startingOffset:
Location within
stringat which to start the analysis. - language:
Language use in
string. Whennil, the language selected in the Spelling panel is used. - wrapFlag:
True to specify that the analysis continue to the beginning of string when the end is reached.
False to have the analysis stop at the end of string.
- tag:
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.
- details:
On output, dictionaries describing grammar-analysis details within the flagged grammatical unit. See the Nsspellserver class for information about these dictionaries.
Return Value
Location of the first flagged grammatical unit.
See Also
Checking Strings for Spelling and Grammar
countWords(in:language:)checkSpelling(of:startingAt:)checkSpelling(of:startingAt:language:wrap:inSpellDocumentWithTag:wordCount:)check(_:range:types:options:inSpellDocumentWithTag:orthography:wordCount:)requestChecking(of:range:types:options:inSpellDocumentWithTag:completionHandler:)guesses(forWordRange:in:language:inSpellDocumentWithTag:)