A nonowning collection interface to a buffer of elements stored contiguously in memory.
SDK
Xcode 6.0.1+
Framework
Swift Standard Library
Declaration
Overview
You can use an UnsafeBufferPointer instance in low level operations to eliminate uniqueness checks and, in release mode, bounds checks. Bounds checks are always performed in debug mode.
UnsafeBufferPointer Semantics
An UnsafeBufferPointer instance is a view into memory and does not own the memory that it references. Copying a value of type UnsafeBufferPointer does not copy the instances stored in the underlying memory. However, initializing another collection with an UnsafeBufferPointer instance copies the instances out of the referenced memory and into the new collection.
Returns the difference needed to produce this collection’s ordered elements from the given collection, using the given predicate as an equivalence test.
Returns a Boolean value indicating whether this sequence and another sequence contain equivalent elements in the same order, using the given predicate as the equivalence test.
Returns a Boolean value indicating whether the sequence precedes another sequence in a lexicographical (dictionary) ordering, using the less-than operator (<) to compare elements.
Returns a Boolean value indicating whether the sequence precedes another sequence in a lexicographical (dictionary) ordering, using the given predicate to compare elements.
Returns a Boolean value indicating whether the initial elements of the sequence are equivalent to the elements in another sequence, using the given predicate as the equivalence test.
Call body(p), where p is a pointer to the collection’s contiguous storage. If no such storage exists, it is first created. If the collection does not support an internal representation in a form of contiguous storage, body is not called and nil is returned.