storeBytes(repeating:count:as:)
Stores the given value’s bytes repeatedly into this span’s memory.
Declaration
mutating func storeBytes<T>(repeating repeatedValue: T, count: Int, as type: T.Type) where T : BitwiseCopyable, T : ConvertibleToBytesParameters
- repeatedValue:
The value to store as raw bytes.
- count:
The number of copies of
repeatedValueto store into this span. - type:
The type of the instance to store repeatedly.
Discussion
There must be at least count * MemoryLayout<T>.stride bytes available in the span.