Applies the given difference to this collection.
SDKs
- iOS 13+
- macOS 10.15+
- Mac Catalyst 13.0+
- tvOS 13+
- watchOS 6+
- Xcode 11.0+
Framework
- Foundation
Declaration
func applying(_ difference: Collection Difference<UInt8>) -> Data?
Parameters
difference
The difference to be applied.
Return Value
An instance representing the state of the receiver with the difference applied, or nil
if the difference is incompatible with the receiver’s state.
Discussion
Complexity: O(n + c), where n is self
and c is the number of changes contained by the parameter.