Contents

indexRange(in:)

Return a Range<IndexSet.Index> which can be used to subscript the index set.

Declaration

func indexRange<R>(in range: R) -> Range<IndexSet.Index> where R : RangeExpression, R.Bound == Int

Parameters

  • range:

    The range of integers to include.

Discussion

The resulting range is the range of the intersection of the integers in range with the index set.