Skip to content

Instance Method

lastRange(of:in:)

iOS 8.0+ iPadOS 8.0+ Mac Catalyst 8.0+ macOS 10.10+ tvOS 9.0+ watchOS 2.0+
Returns the last found range of the given data buffer.
func lastRange<D, R>(of: D, in: R) -> Range<Self.Index>? where D : DataProtocol, R : RangeExpression, Self.Index == R.Bound

Parameters

of

The data sequence to find.

in

A range to limit the scope of the search.

Return Value

The range, if found, of the last match of the provided data sequence.

Discussion

A default implementation is given in terms of self.regions.

Default Implementations

DataProtocol Implementations