libplist  2.7.0
API Documentation - Return to Homepage

◆ plist_data_val_compare()

PLIST_API int plist_data_val_compare ( plist_t  datanode,
const uint8_t *  cmpval,
size_t  n 
)

Helper function to compare the data of a PLIST_DATA node against a given blob and size.

This function basically behaves like memcmp after making sure the size of the node's data value is equal to the size of cmpval (n), making this a "full match" comparison.

Parameters
datanodenode of type PLIST_DATA
cmpvaldata blob to compare against
nsize of data blob passed in cmpval
Returns
0 if the node's data blob and cmpval are equal, > 0 if the node's value is lexicographically greater than cmpval, or < 0 if the node's value is lexicographically less than cmpval.