pub unsafe extern "C-unwind" fn CFStringTokenizerCopyBestStringLanguage(
string: &CFString,
range: CFRange,
) -> Option<CFRetained<CFString>>
Available on crate features
CFBase
and CFStringTokenizer
only.Expand description
Guesses the language of a string and returns the BCP 47 string of the language.
Parameter string
: The string whose language is to be guessed.
Parameter range
: The range of characters in string whose language to be
guessed. The specified range must not exceed the bounds of the string.
Returns: A language represented in BCP 47 string. NULL is returned either if string is NULL, the location of range is negative, the length of range is 0, or the language of the string cannot be guessed.
The result is not guaranteed to be accurate. Typically 200-400 characters are required to reliably guess the language of a string.