<!--
{
  "availability" : [
    "macOS: 10.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/NSAttributedString/doubleClick(at:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:objc(cs)NSAttributedString(im)doubleClickAtIndex:"
  },
  "title" : "doubleClick(at:)"
}
-->

# doubleClick(at:)

Returns the range of characters that form a word (or other linguistic unit) surrounding the specified index, taking language characteristics into account.

```
func doubleClick(at location: Int) -> NSRange
```

## Parameters

`location`

The index in the attributed string.

## Return Value

Returns the range of characters that form a word (or other linguistic unit) surrounding the given index, taking language characteristics into account.

## Discussion

Raises an [`rangeException`](/documentation/Foundation/NSExceptionName/rangeException) if `index` lies beyond the end of the receiver’s characters.

---

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)