---
title: "trimPrefix(_:)"
framework: swift
role: symbol
role_heading: Instance Method
path: "swift/rangereplaceablecollection/trimprefix(_:)-3t4tj"
---

# trimPrefix(_:)

Removes prefix from the start of the collection.

## Declaration

```swift
mutating func trimPrefix<Prefix>(_ prefix: Prefix) where Prefix : Sequence, Self.Element == Prefix.Element
```

## Parameters

- `prefix`: The collection to remove from this collection.
