Contents

setData(_:)

Replaces the entire contents of the receiver with the contents of another data object.

Declaration

func setData(_ data: Data)

Parameters

  • data:

    The data object whose content replaces that of the receiver.

Discussion

As part of its implementation, this method calls replaceBytes(in:withBytes:).

See Also

Modifying Bytes