---
title: "replaceAll(with:)"
framework: coremedia
role: symbol
role_heading: Instance Method
path: "coremedia/cmmutabledatablockbuffer/replaceall(with:)-4sg07"
---

# replaceAll(with:)

Replace all data in the buffer with new bytes.

## Declaration

```swift
mutating func replaceAll(with bytes: UnsafeRawBufferPointer)
```

## Parameters

- `bytes`: The replacement data. This must have the same count as the block buffer.
