Instance Method

makeIterator()

Returns an iterator over the contents of the data.

Declaration

func makeIterator() -> Data.Iterator

Discussion

The iterator will increment byte-by-byte.

Relationships

From Protocol

See Also

Iterating Over Bytes

func forEach((UInt8) -> Void)

Calls the given closure on each element in the sequence in the same order as a for-in loop.

func enumerated() -> EnumeratedSequence<Data>

Returns a sequence of pairs (n, x), where n represents a consecutive integer starting at zero and x represents an element of the sequence.

struct Data.Iterator

An iterator that operates over the contents of data.

func enumerateBytes((UnsafeBufferPointer<UInt8>, Data.Index, inout Bool) -> Void)

Enumerates the contents of the data's buffer.

Deprecated