---
title: "paragraphRange(for:)"
framework: foundation
role: symbol
role_heading: Instance Method
path: "foundation/nsstring/paragraphrange(for:)"
---

# paragraphRange(for:)

Returns the range of characters representing the paragraph or paragraphs containing a given range.

## Declaration

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

## Parameters

- `range`: A range within the receiver. The range must not exceed the bounds of the receiver.

## Return Value

Return Value The range of characters representing the paragraph or paragraphs containing aRange, including the paragraph termination characters.

## Discussion

Discussion A paragraph is any segment of text delimited by a carriage return (U+000D), newline (U+000A), or paragraph separator (U+2029).

## See Also

### Determining Line and Paragraph Ranges

- [getLineStart(_:end:contentsEnd:for:)](foundation/nsstring/getlinestart(_:end:contentsend:for:).md)
- [lineRange(for:)](foundation/nsstring/linerange(for:).md)
- [getParagraphStart(_:end:contentsEnd:for:)](foundation/nsstring/getparagraphstart(_:end:contentsend:for:).md)
