<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.10.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Swift",
  "identifier" : "/documentation/Swift/AnyCollection/suffix(from:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Swift"
    ],
    "preciseIdentifier" : "s:SlsE6suffix4from11SubSequenceQz5IndexQz_tF::SYNTHESIZED::s:s13AnyCollectionV"
  },
  "title" : "suffix(from:)"
}
-->

# suffix(from:)

Returns a subsequence from the specified position to the end of the
collection.

```
func suffix(from start: Self.Index) -> Self.SubSequence
```

## Parameters

`start`

The index at which to start the resulting subsequence.
`start` must be a valid index of the collection.

## Return Value

A subsequence starting at the `start` position.

## Discussion

The following example searches for the index of the number `40` in an
array of integers, and then prints the suffix of the array starting at
that index:

```
let numbers = [10, 20, 30, 40, 50, 60]
if let i = numbers.firstIndex(of: 40) {
    print(numbers.suffix(from: i))
}
// Prints "[40, 50, 60]"
```

Passing the collection’s `endIndex` as the `start` parameter results in
an empty subsequence.

```
print(numbers.suffix(from: numbers.endIndex))
// Prints "[]"
```

Using the `suffix(from:)` method is equivalent to using a partial range
from the index as the collection’s subscript. The subscript notation is
preferred over `suffix(from:)`.

```
if let i = numbers.firstIndex(of: 40) {
    print(numbers[i...])
}
// Prints "[40, 50, 60]"
```

> Complexity: O(1)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)