Compare two CGPDFDictionary

Is there a way to compare two CGPDF dictionaries? There is a memcmp function, but it does not work for me, because the dictionaries are in different memory cells.

+4
source share
1 answer

Can you use the CGPDFDictionaryApplyFunction function?

It seems that if you provide a callback function, it will be called for each key-value pair.

void CGPDFDictionaryApplyFunction ( CGPDFDictionaryRef dict, CGPDFDictionaryApplierFunction function, void *info ); 

So you can pass your second dictionary (say dict2 ) as info . In CGPDFDictionaryApplierFunction you can see if there is a current current key , also in dict2

0
source

Source: https://habr.com/ru/post/1315935/


All Articles