CFDataSetLength(_:_:)
Resets the length of a CFMutableData object’s internal byte buffer.
Declaration
func CFDataSetLength(_ theData: CFMutableData!, _ length: CFIndex)Parameters
- theData:
A CFMutableData object. If you pass an immutable CFData object, the behavior is not defined.
- length:
The new size of
theData’s byte buffer.
Discussion
This function resets the length of a CFMutableData object’s underlying byte buffer to a new size. If that size is less than the current size, it truncates the excess bytes. If that size is greater than the current size, it zero-fills the extension to the byte buffer.