CFDictionaryGetCountOfKey

Header: CFDictionary.h Carbon status: Supported

Counts the number of times the given key occurs in the dictionary.

CFIndex CFDictionaryGetCountOfKey (
    CFDictionaryRef dict, 
    const void *key
);
Parameter descriptions
dict

The dictionary to be searched. If this parameter is not a valid CFDictionary, the behavior is undefined.

key

The key for which to find matches in the dictionary. The hash() and equal() key callbacks provided when the dictionary was created are used to compare. If the hash() key callback was NULL, the key is treated as a pointer and converted to an integer. If the equal() key callback was NULL, pointer equality (in C, ==) is used. If key, or any of the keys in the dictionary, are not understood by the equal() callback, the behavior is undefined.

function result

Returns 1 if a matching key is used by the dictionary, 0 otherwise.

AVAILABILITY

Supported in Carbon. Available in Carbon 1.0.2 and later.


© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)