Instance Method

reversed()

Returns an array containing the elements of this sequence in reverse order.

Declaration

func reversed() -> [UInt8]

Return Value

An array containing the elements of this sequence in reverse order.

Discussion

The sequence must be finite.

Complexity: O(n), where n is the length of the sequence.

See Also

Reordering Bytes

func sorted() -> [UInt8]

Returns the elements of the sequence, sorted.

func sorted(by: (UInt8, UInt8) -> Bool) -> [UInt8]

Returns the elements of the sequence, sorted using the given predicate as the comparison between elements.

func shuffled() -> [UInt8]

Returns the elements of the sequence, shuffled.

func shuffled<T>(using: inout T) -> [UInt8]

Returns the elements of the sequence, shuffled using the given generator as a source for randomness.