---
title: removeFirst()
framework: swift
role: symbol
role_heading: Instance Method
path: swift/substring/unicodescalarview/removefirst()-2wary
---

# removeFirst()

Removes and returns the first element of the collection.

## Declaration

```swift
@discardableResult mutating func removeFirst() -> Self.Element
```

## Return Value

Return Value The first element of the collection.

## Discussion

Discussion The collection must not be empty. note: O(1)
