---
title: "tokenRange(at:)"
framework: naturallanguage
role: symbol
role_heading: Instance Method
path: "naturallanguage/nltokenizer/tokenrange(at:)"
---

# tokenRange(at:)

Finds the range of the token at the given index.

## Declaration

```swift
@nonobjc func tokenRange(at index: String.Index) -> Range<String.Index>
```

## Parameters

- `index`: The location in the string that is of interest.

## Return Value

Return Value The range of the token at the given location.

## See Also

### Enumerating the tokens

- [enumerateTokens(in:using:)](naturallanguage/nltokenizer/enumeratetokens(in:using:).md)
- [tokens(for:)](naturallanguage/nltokenizer/tokens(for:).md)
- [tokenRange(for:)](naturallanguage/nltokenizer/tokenrange(for:).md)
