Instance Method

replaceSubrange(_:with:count:)

Replaces a region of bytes in the data with bytes from memory.

Declaration

mutating func replaceSubrange(_ subrange: Range<Data.Index>, with bytes: UnsafeRawPointer, count cnt: Int)

See Also

Replacing a Range of Bytes

func replaceSubrange(Range<Data.Index>, with: Data)

Replaces a region of bytes in the data with new data.

func replaceSubrange<ByteCollection>(Range<Data.Index>, with: ByteCollection)

Replaces a region of bytes in the data with new bytes from a collection.

func replaceSubrange<SourceType>(Range<Data.Index>, with: UnsafeBufferPointer<SourceType>)

Replaces a region of bytes in the data with new bytes from a buffer.

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