<!--
{
  "availability" : [
    "iOS: 3.2.0 -",
    "iPadOS: 3.2.0 -",
    "macCatalyst: 13.1.0 -",
    "tvOS: -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UITextChecker/completions(forPartialWordRange:in:language:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UITextChecker(im)completionsForPartialWordRange:inString:language:"
  },
  "title" : "completions(forPartialWordRange:in:language:)"
}
-->

# completions(forPartialWordRange:in:language:)

Returns an array of strings that are possible completions for a partially entered word.

```
func completions(forPartialWordRange range: NSRange, in string: String, language: String) -> [String]?
```

## Parameters

`range`

The range of a partially entered word in `string`.

`string`

A string in which there is a partially entered word, as located by `range`.

`language`

The language of the of the words that are possible corrections. This string is a ISO 639-1 language code or a combined ISO 639-1 language code and ISO 3166-1 regional code (for example, `fr_CA`).

## Return Value

An array of strings, each of which is a completion of a partially entered word represented by `range` in `string`. If no possible completions are found,  the method returns an empty array.

## Discussion

The strings in the array are in the order they should be presented to the user—that is, more probable completions come first in the array.

---

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)