trimmingPrefix(_:)

Returns a new collection of the same type by removing prefix from the start of the collection.

iOS
16.0+
macOS
13.0+
tvOS
16.0+
watchOS
9.0+
func trimmingPrefix<Prefix>(_ prefix: Prefix) -> Self.SubSequence where Prefix : Sequence, Self.Element == Prefix.Element

Parameters

prefix

The collection to remove from this collection.

Returns

A collection containing the elements of the collection that are not removed by prefix.