<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSSpellChecker/checkSpelling(of:startingAt:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSSpellChecker(im)checkSpellingOfString:startingAt:"
  },
  "title" : "checkSpelling(of:startingAt:)"
}
-->

# checkSpelling(of:startingAt:)

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

```
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

Returns the range of the first misspelled word.

## Discussion

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

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)