<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 8.0.0 -",
    "macOS: 10.10.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/Data/advanced(by:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "s:10Foundation4DataV8advanced2byACSi_tF"
  },
  "title" : "advanced(by:)"
}
-->

# advanced(by:)

Returns a new data buffer created by removing the given number of bytes from the front of the original buffer.

```
func advanced(by amount: Int) -> Data
```

## Parameters

`amount`

The number of bytes to strip from the input data buffer. The value must be less than the original data buffer’s length.

## Return Value

A newly created data buffer that is shorter by the given amount than the original.

## Discussion

---

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)