withUnsafeMutableBytes(_:)
Mutates the raw bytes in the data’s buffer.
Declaration
mutating func withUnsafeMutableBytes<ResultType, ContentType>(_ body: (UnsafeMutablePointer<ContentType>) throws -> ResultType) rethrows -> ResultTypeDiscussion
This function assumes that you are mutating the contents.