Skip to content

Instance Method

replaceSubrange(_:with:count:)

iOS 8.0+ iPadOS 8.0+ Mac Catalyst 8.0+ macOS 10.10+ tvOS 9.0+ watchOS 2.0+
Replaces a region of bytes in the data with bytes from memory.
mutating func replaceSubrange(_ subrange: Range<Data.Index>, with bytes: UnsafeRawPointer, count cnt: Int)