Generic Instance Method

append(_:)

Append a buffer of bytes to the data.

Declaration

mutating func append<SourceType>(_ buffer: UnsafeBufferPointer<SourceType>)

Parameters

buffer

The buffer of bytes to append. The size is calculated from SourceType and buffer.count.

See Also

Adding Bytes

func append(Data)

Appends the specified data to the end of this data.

func append(UnsafePointer<UInt8>, count: Int)

Appends the specified bytes from memory to the end of the data.

func append(contentsOf: [UInt8])

Appends the bytes in the specified array to the end of the data.

func reserveCapacity(Int)

Prepares the collection to store the specified number of elements, when doing so is appropriate for the underlying type.

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