---
title: "CFDataDeleteBytes(_:_:)"
framework: corefoundation
role: symbol
role_heading: Function
path: "corefoundation/cfdatadeletebytes(_:_:)"
---

# CFDataDeleteBytes(_:_:)

Deletes the bytes in a CFMutableData object within a specified range.

## Declaration

```swift
func CFDataDeleteBytes(_ theData: CFMutableData!, _ range: CFRange)
```

## Parameters

- `theData`: A CFMutableData object. If you pass an immutable CFData object, the behavior is not defined.
- `range`: The range of bytes (that is, the starting byte and the number of bytes from that point) to delete from theData’s byte buffer.

## See Also

### Modifying a Mutable Data Object

- [CFDataAppendBytes(_:_:_:)](corefoundation/cfdataappendbytes(_:_:_:).md)
- [CFDataReplaceBytes(_:_:_:_:)](corefoundation/cfdatareplacebytes(_:_:_:_:).md)
- [CFDataIncreaseLength(_:_:)](corefoundation/cfdataincreaselength(_:_:).md)
- [CFDataSetLength(_:_:)](corefoundation/cfdatasetlength(_:_:).md)
