split(separator:maxSplits:omittingEmptySubsequences:)
Returns the longest possible subsequences of the collection, in order, around elements equal to the given separator.
Declaration
func split(separator: some RegexComponent, maxSplits: Int = .max, omittingEmptySubsequences: Bool = true) -> [Self.SubSequence]Parameters
- separator:
A regex describing elements to be split upon.
Return Value
A collection of substrings, split from this collection’s elements.