Initializes the buffer’s memory with the given elements.
- Xcode 8.3+
- Swift Standard Library
A sequence of elements with which to initializer the buffer.
An iterator to any elements of
source that didn’t fit in the buffer, and an index to the point in the buffer one past the last element written.
When calling the
initialize(from:) method on a buffer
b, the memory referenced by
b must be uninitialized or the
Element type must be a trivial type. After the call, the memory referenced by this buffer up to, but not including, the returned index is initialized. The buffer must contain sufficient memory to accommodate
The returned index is the position of the element in the buffer one past the last element written. If
source contains no elements, the returned index is equal to the buffer’s
source contains an equal or greater number of elements than the buffer can hold, the returned index is equal to the buffer’s