Contents

init(_:)

Creates a range set containing the values in the given ranges.

Declaration

init(_ ranges: some Sequence<Range<Bound>>)

Parameters

  • ranges:

    The ranges to use for the new range set.

Discussion

Any empty ranges in ranges are ignored, and non-empty ranges are merged to eliminate any overlaps. As such, the ranges collection in the resulting range set may not be equivalent to the sequence of ranges passed to this initializer.