String Comparison Flags

Flags that specify how string comparisons are performed.

Overview

These constants are flags intended for use in the comparison-option parameters in comparison functions such as CFStringCompare. If you want to request multiple options, combine them with a bitwise-OR operation.

Topics

Constants

kCFCompareCaseInsensitive

Specifies that the comparison should ignore differences in case between alphabetical characters.

kCFCompareBackwards

Specifies that the comparison should start at the last elements of the entities being compared (for example, strings or arrays).

kCFCompareAnchored

Performs searching only on characters at the beginning or end of the range.

kCFCompareNonliteral

Specifies that loose equivalence is acceptable, especially as pertains to diacritical marks.

kCFCompareLocalized

Specifies that the comparison should take into account differences related to locale, such as the thousands separator character.

kCFCompareNumerically

Specifies that represented numeric values should be used as the basis for comparison and not the actual character values.

kCFCompareDiacriticInsensitive

Specifies that the comparison should ignore diacritic markers.

kCFCompareWidthInsensitive

Specifies that the comparison should ignore width differences.

kCFCompareForcedOrdering

Specifies that the comparison is forced to return either kCFCompareLessThan or kCFCompareGreaterThan if the strings are equivalent but not strictly equal.