Instance Property

underestimatedCount

A value less than or equal to the number of elements in the collection.

Declaration

var underestimatedCount: Int { get }

Discussion

Complexity: O(1) if the collection conforms to RandomAccessCollection; otherwise, O(n), where n is the length of the collection.

See Also

Getting Information About the Buffer

var isEmpty: Bool

A Boolean value indicating whether the collection is empty.

var first: UInt8?

The first element of the collection.

var last: UInt8?

The last element of the collection.

func max() -> UInt8?

Returns the maximum element in the sequence.

func max(by: (UInt8, UInt8) -> Bool) -> UInt8?

Returns the maximum element in the sequence, using the given predicate as the comparison between elements.

func min() -> UInt8?

Returns the minimum element in the sequence.

func min(by: (UInt8, UInt8) -> Bool) -> UInt8?

Returns the minimum element in the sequence, using the given predicate as the comparison between elements.

func distance(from: Int, to: Int) -> Int

Returns the distance between two indexes.

func allSatisfy((UInt8) -> Bool) -> Bool

Returns a Boolean value indicating whether every element of a sequence satisfies a given predicate.