Instance MethodSwiftFoundation
firstRange(of:in:)
Returns the first found range of the given data buffer.
Available because
Self
conforms toDataProtocol
.
func firstRange<D, R>(of data: D, in range: R) -> Range<Self.Index>? where D : DataProtocol, R : RangeExpression, Self.Index == R.Bound
Overview
A default implementation is given in terms of self.regions
.