paragraphRange(for:)
Returns the range of characters representing the paragraph or paragraphs containing a given range.
Declaration
func paragraphRange(for range: NSRange) -> NSRangeParameters
- range:
A range within the receiver. The range must not exceed the bounds of the receiver.
Return Value
The range of characters representing the paragraph or paragraphs containing aRange, including the paragraph termination characters.
Discussion
A paragraph is any segment of text delimited by a carriage return (U+000D), newline (U+000A), or paragraph separator (U+2029).