---
title: "sentenceRange(for:)"
framework: foundation
role: symbol
role_heading: Instance Method
path: "foundation/nslinguistictagger/sentencerange(for:)"
---

# sentenceRange(for:)

Returns the range of a sentence containing the specified range.

## Declaration

```swift
func sentenceRange(for range: NSRange) -> NSRange
```

## Parameters

- `range`: The character range.

## Return Value

Return Value Returns the range of the sentence.

## Discussion

Discussion This is a convenience method for calling tokenRange(at:unit:), passing the NSLinguisticTaggerUnit.sentence unit and the first position of the provided range.

## See Also

### Determining the Range of a Unit Token

- [tokenRange(at:unit:)](foundation/nslinguistictagger/tokenrange(at:unit:).md)
