Skip to content

Instance Method

copyBytes(to:from:)

iOS 8.0+ iPadOS 8.0+ Mac Catalyst 8.0+ macOS 10.10+ tvOS 9.0+ watchOS 2.0+
Copies the bytes from the given range to the destination buffer.
@discardableResult func copyBytes<DestinationType, R>(to: UnsafeMutableBufferPointer<DestinationType>, from: R) -> Int where R : RangeExpression, Self.Index == R.Bound

Parameters

to

A typed pointer to the buffer you want to copy the bytes into.

from

The range of bytes to copy.

Return Value

The number of bytes copied.

Discussion

A default implementation is given in terms of self.regions.

Default Implementations

DataProtocol Implementations