---
title: Order Dependent Operations on Set
framework: swift
role: collectionGroup
role_heading: API Collection
path: swift/order-dependent-operations-on-set
---

# Order Dependent Operations on Set

Perform order-dependent operations common to all collections, as implemented for Set.

## Topics

### Manipulating Indices

- [startIndex](swift/set/startindex.md)
- [endIndex](swift/set/endindex.md)
- [index(after:)](swift/set/index(after:).md)
- [formIndex(after:)](swift/set/formindex(after:).md)
- [index(_:offsetBy:)](swift/set/index(_:offsetby:).md)
- [formIndex(_:offsetBy:)](swift/set/formindex(_:offsetby:).md)
- [index(_:offsetBy:limitedBy:)](swift/set/index(_:offsetby:limitedby:).md)
- [formIndex(_:offsetBy:limitedBy:)](swift/set/formindex(_:offsetby:limitedby:).md)
- [distance(from:to:)](swift/set/distance(from:to:).md)
- [indices](swift/set/indices-swift.property.md)

### Comparing Sets

- [elementsEqual(_:)](swift/set/elementsequal(_:).md)
- [elementsEqual(_:by:)](swift/set/elementsequal(_:by:).md)
- [lexicographicallyPrecedes(_:)](swift/set/lexicographicallyprecedes(_:).md)
- [lexicographicallyPrecedes(_:by:)](swift/set/lexicographicallyprecedes(_:by:).md)
- [starts(with:)](swift/set/starts(with:).md)
- [starts(with:by:)](swift/set/starts(with:by:).md)

### Selecting Elements

- [subscript(_:)](swift/set/subscript(_:).md)
- [prefix(_:)](swift/set/prefix(_:).md)
- [prefix(upTo:)](swift/set/prefix(upto:).md)
- [prefix(through:)](swift/set/prefix(through:).md)
- [prefix(while:)](swift/set/prefix(while:).md)
- [suffix(_:)](swift/set/suffix(_:).md)
- [suffix(from:)](swift/set/suffix(from:).md)

### Excluding Elements

- [drop(while:)](swift/set/drop(while:).md)
- [dropFirst(_:)](swift/set/dropfirst(_:).md)
- [dropLast(_:)](swift/set/droplast(_:).md)
- [popFirst()](swift/set/popfirst().md)

### Reversing a Set’s Elements

- [reversed()](swift/set/reversed().md)

### Splitting and Joining Elements

- [joined()](swift/set/joined().md)
- [joined(separator:)](swift/set/joined(separator:)-7ubey.md)
- [joined(separator:)](swift/set/joined(separator:)-1cko4.md)
- [split(separator:maxSplits:omittingEmptySubsequences:)](swift/set/split(separator:maxsplits:omittingemptysubsequences:).md)
- [split(maxSplits:omittingEmptySubsequences:whereSeparator:)](swift/set/split(maxsplits:omittingemptysubsequences:whereseparator:).md)
