Contents

getBytes(_:range:)

Copies a range of bytes from the data object into a given buffer.

Declaration

func getBytes(_ buffer: UnsafeMutableRawPointer, range: NSRange)

Parameters

  • buffer:

    A buffer into which to copy data.

  • range:

    The range of bytes in the receiver’s data to copy to buffer. The range must lie within the range of bytes of the receiver’s data.

Discussion

If range isn’t within the receiver’s range of bytes, an rangeException is raised.

See Also

Related Documentation

Accessing Underlying Bytes