---
title: "trimmingPrefix(_:)"
framework: swift
role: symbol
role_heading: Instance Method
path: "swift/collection/trimmingprefix(_:)"
---

# trimmingPrefix(_:)

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

## Declaration

```swift
func trimmingPrefix<Prefix>(_ prefix: Prefix) -> Self.SubSequence where Prefix : Sequence, Self.Element == Prefix.Element
```

## Parameters

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

## Return Value

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