Instance Method

isEqualToData:

Returns a Boolean value indicating whether this data object is the same as another.

Declaration

- (BOOL)isEqualToData:(NSData *)other;

Parameters

otherData

The data object with which to compare the receiver.

Return Value

YES if the contents of otherData are equal to the contents of the receiver, otherwise NO.

Discussion

Two data objects are equal if they hold the same number of bytes, and if the bytes at the same position in the objects are the same.

See Also

Testing Data

length

The number of bytes contained by the data object.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software