---
title: "doubleClick(at:)"
framework: foundation
role: symbol
role_heading: Instance Method
path: "foundation/nsattributedstring/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.

## Declaration

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

## Parameters

- `location`: The index in the attributed string.

## Return Value

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

Discussion Raises an rangeException if index lies beyond the end of the receiver’s characters.

## See Also

### Calculating linguistic units

- [lineBreak(before:within:)](foundation/nsattributedstring/linebreak(before:within:).md)
- [lineBreakByHyphenating(before:within:)](foundation/nsattributedstring/linebreakbyhyphenating(before:within:).md)
- [nextWord(from:forward:)](foundation/nsattributedstring/nextword(from:forward:).md)
