Skip to content

Commit 8654d0c

Browse files
committed
Additional remove(integersIn:)
1 parent f3e4b3d commit 8654d0c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Foundation/IndexSet.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -596,6 +596,11 @@ public struct IndexSet : ReferenceConvertible, Equatable, BidirectionalCollectio
596596
self.insert(integersIn: range.relative(to: 0..<Int.max))
597597
}
598598

599+
/// Remove a range of integers from the `IndexSet`.
600+
public mutating func remove(integersIn range: Range<Element>) {
601+
_applyMutation { $0.remove(in: _toNSRange(range)) }
602+
}
603+
599604
/// Remove a range of integers from the `IndexSet`.
600605
public mutating func remove(integersIn range: ClosedRange<Element>) {
601606
self.remove(integersIn: Range(range))

0 commit comments

Comments
 (0)