Instance Method

assign(repeating:)

Assigns every element in this buffer’s memory to a copy of the given value.

Declaration

func assign(repeating repeatedValue: Element)

Parameters

repeatedValue

The instance to assign this buffer’s memory to.

Discussion

The buffer’s memory must be initialized or the buffer’s Element must be a trivial type.

Warning: All buffer elements must be initialized before calling this. Assigning to part of the buffer must be done using the assign(repeating:count:)`` method on the buffer’s baseAddress`.