Skip to content

Instance MethodSwift

paragraphRange(for:)

iOS 8.0+ iPadOS 8.0+ Mac Catalyst 8.0+ macOS 10.10+ tvOS 9.0+ watchOS 2.0+
Returns the range of characters representing the paragraph or paragraphs containing a given range.
func paragraphRange(for range: some RangeExpression<String.Index>) -> Range<Self.Index>