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

# range(of:at:)

Returns the range of the specified text table that contains the specified location.

```
func range(of table: NSTextTable, at location: Int) -> NSRange
```

## Parameters

`table`

The text table.

`location`

The location.

## Return Value

Returns the range of `table` that contains `location`.

---

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)