Instance Method

resetBytes(in:)

Sets a region of the data buffer to 0.

Declaration

mutating func resetBytes(in range: Range<Data.Index>)

Parameters

range

The range in the data to set to 0.

Discussion

If range exceeds the bounds of the data, then the data is resized to fit.

See Also

Creating Empty Data

init()

Creates an empty data buffer.

init(capacity: Int)

Creates an empty data buffer of a specified size.

init(count: Int)

Creates a new data buffer with the specified count of zeroed bytes.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software