Initializer

init(uncheckedBounds:)

Creates an instance with the given bounds.

Declaration

init(uncheckedBounds bounds: (lower: Bound, upper: Bound))

Parameters

bounds

A tuple of the lower and upper bounds of the range.

Discussion

Because this initializer does not perform any checks, it should be used as an optimization only when you are absolutely certain that lower is less than or equal to upper. Using the half-open range operator (..<) to form Range instances is preferred.

See Also

Infrequently Used Functionality

func index(of: Bound) -> Bound?

Returns the first index where the specified value appears in the collection.

Deprecated
func withContiguousStorageIfAvailable<R>((UnsafeBufferPointer<Bound>) -> R) -> R?

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.