Folds a given string into the form specified by optional flags.
- iOS 2.0+
- macOS 10.5+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
- Core Foundation
The string which is to be folded. If this parameter is not a valid mutable CFString, the behavior is undefined.
The equivalency flags which describes the character folding form. See “String Comparison Flags” in CFString for possible values. Only those flags containing the word "insensitive" are recognized; other flags are ignored.
kremoves case distinctions in accordance with the mapping specified by ftp://ftp.unicode.org/Public/UNIDATA/CaseFolding.txt. Folding with
CFCompare Case Insensitive
kremoves distinctions of accents and other diacritics. Folding with
CFCompare Diacritic Insensitive
kremoves character width distinctions by mapping characters in the range
CFCompare Width Insensitive
U+FF00-U+FFEFto their ordinary equivalents.
The locale to use for the operation.
NULLspecifies the canonical locale (the return value from
The locale argument affects the case mapping algorithm. For example, for the Turkish locale, case-insensitive compare matches “I” to “ı” (Unicode code point U+0131, Latin Small Dotless I), not the normal “i” character.
Character foldings are operations that convert any of a set of characters sharing similar semantics into a single representative from that set.
You can use this function to preprocess strings that are to be compared, searched, or indexed. Note that folding does not include normalization, so you must use
CFString in addition to CFStringFold in order to obtain the effect of