I'm trying to use CFStringTokenizerCopyBestStringLanguage
. The docs say:
The range of string to use for the test. If NULL, the first few hundred characters of the string are examined.
But passing NULL
yields an error:
Passing 'void *' to parameter of incompatible type 'CFRange'
What is the correct way of doing this?
NSString *language = (NSString *)CFBridgingRelease(CFStringTokenizerCopyBestStringLanguage((CFStringRef)text, NULL));