Instance MethodFoundationEssentials
enumerateBytes(_:)
iOS 8.0+
iPadOS 8.0+
Mac Catalyst 8.0+
macOS 10.10+
tvOS 9.0+
watchOS 2.0+
SwiftDeprecated
Deprecated
This symbol is deprecated.
Enumerates the contents of the data’s buffer.
Parameters
blockThe closure to invoke for each region of data. You may stop the enumeration by setting the
stopparameter totrue.
Discussion
In some cases, (for example, a Data backed by a dispatch_data_t, the bytes may be stored discontinuously. In those cases, this function invokes the closure for each contiguous region of bytes.