---
title: "checkSpelling(of:startingAt:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nsspellchecker/checkspelling(of:startingat:)"
---

# checkSpelling(of:startingAt:)

Starts the search for a misspelled word in stringToCheck starting at startingOffset within the string object.

## Declaration

```swift
func checkSpelling(of stringToCheck: String, startingAt startingOffset: Int) -> NSRange
```

## Parameters

- `stringToCheck`: The string to spell check.
- `startingOffset`: The offset at which to start checking.

## Return Value

Return Value Returns the range of the first misspelled word.

## Discussion

Discussion Wrapping occurs, but no ignored-words dictionary is used.

## See Also

### Checking Strings for Spelling and Grammar

- [countWords(in:language:)](appkit/nsspellchecker/countwords(in:language:).md)
- [checkSpelling(of:startingAt:language:wrap:inSpellDocumentWithTag:wordCount:)](appkit/nsspellchecker/checkspelling(of:startingat:language:wrap:inspelldocumentwithtag:wordcount:).md)
- [checkGrammar(of:startingAt:language:wrap:inSpellDocumentWithTag:details:)](appkit/nsspellchecker/checkgrammar(of:startingat:language:wrap:inspelldocumentwithtag:details:).md)
- [check(_:range:types:options:inSpellDocumentWithTag:orthography:wordCount:)](appkit/nsspellchecker/check(_:range:types:options:inspelldocumentwithtag:orthography:wordcount:).md)
- [requestChecking(of:range:types:options:inSpellDocumentWithTag:completionHandler:)](appkit/nsspellchecker/requestchecking(of:range:types:options:inspelldocumentwithtag:completionhandler:).md)
- [guesses(forWordRange:in:language:inSpellDocumentWithTag:)](appkit/nsspellchecker/guesses(forwordrange:in:language:inspelldocumentwithtag:).md)
