Skip to main content

CFStringFold

Function CFStringFold 

Source
pub unsafe extern "C" fn CFStringFold(
    theString: CFMutableStringRef,
    theFlags: CFStringCompareFlags,
    theLocale: CFLocaleRef,
)
Expand description

@function CFStringFold Folds the string into the form specified by the flags. Character foldings are operations that convert any of a set of characters sharing similar semantics into a single representative from that set. This function can be used to preprocess strings that are to be compared, searched, or indexed. Note that folding does not include normalization, so it is necessary to use CFStringNormalize in addition to CFStringFold in order to obtain the effect of kCFCompareNonliteral. @param theString The string which is to be folded. If this parameter is not a valid mutable CFString, the behavior is undefined. @param theFlags The equivalency flags which describes the character folding form. Only those flags containing the word “insensitive” are recognized here; other flags are ignored. Folding with kCFCompareCaseInsensitive removes case distinctions in accordance with the mapping specified by ftp://ftp.unicode.org/Public/UNIDATA/CaseFolding.txt. Folding with kCFCompareDiacriticInsensitive removes distinctions of accents and other diacritics. Folding with kCFCompareWidthInsensitive removes character width distinctions by mapping characters in the range U+FF00-U+FFEF to their ordinary equivalents. @param theLocale The locale tailoring the character folding behavior. If NULL, it’s considered to be the system locale returned from CFLocaleGetSystem(). If non-NULL and not a valid CFLocale object, the behavior is undefined.