libplist  2.7.0
API Documentation - Return to Homepage

◆ plist_key_val_compare_with_size()

PLIST_API int plist_key_val_compare_with_size ( plist_t  keynode,
const char *  cmpval,
size_t  n 
)

Helper function to compare the value of a PLIST_KEY node against a given value, while not comparing more than n characters.

This function basically behaves like strncmp.

Parameters
keynodenode of type PLIST_KEY
cmpvalvalue to compare against
nmaximum number of characters to compare
Returns
0 if the node's value 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.