---
title: "split(separator:maxSplits:omittingEmptySubsequences:)"
framework: swift
role: symbol
role_heading: Instance Method
path: "swift/collection/split(separator:maxsplits:omittingemptysubsequences:)-9esbr"
---

# split(separator:maxSplits:omittingEmptySubsequences:)

Returns the longest possible subsequences of the collection, in order, around elements equal to the given separator.

## Declaration

```swift
func split<C>(separator: C, maxSplits: Int = .max, omittingEmptySubsequences: Bool = true) -> [Self.SubSequence] where C : Collection, Self.Element == C.Element
```

## Parameters

- `separator`: The element to be split upon.

## Return Value

Return Value A collection of subsequences, split from this collection’s elements.

## See Also

### Splitting and Joining Elements

- [split(separator:maxSplits:omittingEmptySubsequences:)](swift/collection/split(separator:maxsplits:omittingemptysubsequences:)-6c22.md)
- [split(maxSplits:omittingEmptySubsequences:whereSeparator:)](swift/collection/split(maxsplits:omittingemptysubsequences:whereseparator:).md)
