<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: 27.0.0 -",
    "macOS: 27.0.0 -",
    "tvOS: 27.0.0 -",
    "visionOS: 27.0.0 -",
    "watchOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Swift",
  "identifier" : "/documentation/Swift/Span/BorrowingIterator/skip(by:)-7429v",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Swift"
    ],
    "preciseIdentifier" : "s:s25BorrowingIteratorProtocolPsRi_zRi0_z7ElementRj_zrlE4skip2byS2i_t7FailureQzYKF::SYNTHESIZED::s:s4SpanVsRi_zrlE17BorrowingIteratorV"
  },
  "title" : "skip(by:)"
}
-->

# skip(by:)

Advances the position of this iterator by the specified offset, or until
the end of the underlying type’s elements.

```
@export(implementation) mutating func skip(by offset: Int) throws(Self.Failure) -> Int
```

## Return Value

The number of items that were skipped. If the returned count
is less than `maxOffset`, then the underlying type did not have
enough elements left to skip the requested number of items.
In that case, the iterator’s position is set to the end of the underlying type.

---

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)