resetBytes(in:)
Replaces with zeroes the contents of the data object in a given range.
func resetBytes(in range: NSRange)
Replaces with zeroes the contents of the data object in a given range.
func resetBytes(in range: NSRange)
s10Foundation13NSMutableDataC10resetBytes2inyAA8_NSRangeV_tF
What are these?903MZ
import Foundation
class NSMutableData
override init()
override init?(base64Encoded base64Data: Data, options: NSData.Base64DecodingOptions = [])
override init?(base64Encoded base64Data: String, options: NSData.Base64DecodingOptions = [])
override init(bytes: UnsafeRawPointer?, length: Int)
Initializes a data object filled with a given number of bytes copied from a given buffer.
override init(bytesNoCopy bytes: UnsafeMutableRawPointer, length: Int)
override init(bytesNoCopy bytes: UnsafeMutableRawPointer, length: Int, deallocator: ((UnsafeMutableRawPointer, Int) -> Void)? = nil)
override init(bytesNoCopy bytes: UnsafeMutableRawPointer, length: Int, freeWhenDone: Bool)
init?(capacity: Int)
Returns an initialized mutable data object capable of holding the specified number of bytes.
required init?(coder aDecoder: NSCoder)
override init?(contentsOf url: URL)
override init(contentsOf url: URL, options: NSData.ReadingOptions = []) throws
override init?(contentsOfFile path: String)
override init(contentsOfFile path: String, options: NSData.ReadingOptions = []) throws
override init(data: Data)
init?(length: Int)
Initializes and returns a mutable data object containing a given number of zeroed bytes.
override var length: Int { get set }
The number of bytes contained in the mutable data object.
var mutableBytes: UnsafeMutableRawPointer { get }
A pointer to the data contained by the mutable data object.
func append(_ other: Data)
Appends the content of another data object to the data object.
func append(_ bytes: UnsafeRawPointer, length: Int)
Appends to the data object a given number of bytes from a given buffer.
override func copy(with zone: NSZone? = nil) -> Any
func increaseLength(by extraLength: Int)
Increases the length of the data object by a given number of bytes.
func replaceBytes(in range: NSRange, withBytes bytes: UnsafeRawPointer)
Replaces with a given set of bytes a given range within the contents of the data object.
func replaceBytes(in range: NSRange, withBytes replacementBytes: UnsafeRawPointer?, length replacementLength: Int)
Replaces with a given set of bytes a given range within the contents of the data object.
func setData(_ data: Data)
Replaces the entire contents of the data object with the contents of another data object.