Instance Method (Default implementation)swift 6.0.3FoundationEssentials
copyBytes(to:count:)
- iOS
- 8.0+
- macOS
- 10.10+
- tvOS
- 9.0+
- watchOS
- 2.0+
@discardableResult func copyBytes(to ptr: UnsafeMutableRawBufferPointer, count: Int) -> Int
@discardableResult func copyBytes(to ptr: UnsafeMutableRawBufferPointer, count: Int) -> Int
s20FoundationEssentials12DataProtocolPAAE9copyBytes2to5countSiSw_SitF
What are these?39QKX
import FoundationEssentials
protocol DataProtocol : RandomAccessCollection where Self.Element == UInt8, Self.SubSequence : DataProtocol
@frozen struct UnsafeMutableRawBufferPointer
A mutable nonowning collection interface to the bytes in a region of memory.
@frozen struct Int
A signed integer value type.
@discardableResult func copyBytes<DestinationType>(to: UnsafeMutableBufferPointer<DestinationType>, count: Int) -> Int
Copies count
bytes from the start of the buffer to the destination buffer.
@discardableResult func copyBytes(to: UnsafeMutableRawBufferPointer, count: Int) -> Int
Copies count
bytes from the start of the buffer to the destination buffer.
@discardableResult func copyBytes<DestinationType>(to ptr: UnsafeMutableBufferPointer<DestinationType>) -> Int
@discardableResult func copyBytes(to ptr: UnsafeMutableRawBufferPointer) -> Int
@discardableResult func copyBytes<DestinationType>(to ptr: UnsafeMutableBufferPointer<DestinationType>, count: Int) -> Int
@discardableResult func copyBytes<DestinationType, R>(to ptr: UnsafeMutableBufferPointer<DestinationType>, from range: R) -> Int where R : RangeExpression, Self.Index == R.Bound
@discardableResult func copyBytes<R>(to ptr: UnsafeMutableRawBufferPointer, from range: R) -> Int where R : RangeExpression, Self.Index == R.Bound
func firstRange<D>(of data: D) -> Range<Self.Index>? where D : DataProtocol
func firstRange<D, R>(of data: D, in range: R) -> Range<Self.Index>? where D : DataProtocol, R : RangeExpression, Self.Index == R.Bound
func lastRange<D>(of data: D) -> Range<Self.Index>? where D : DataProtocol
func lastRange<D, R>(of data: D, in range: R) -> Range<Self.Index>? where D : DataProtocol, R : RangeExpression, Self.Index == R.Bound