CFStringCompareHeader: CFString.h

Compares one CFString object with another CFString object.

CFComparisonResult CFStringCompare (
    CFStringRef string1, 
    CFStringRef string2, 
    CFOptionFlags compareOptions
);
string1

Pass a reference to the first CFString object to be used in the comparison.

string2

Pass a reference to the second CFString object to be used in the comparison.

compareOptions

Pass a bitfield of type CFOptionFlags containing one or more comparison-option flags (OR'd together if multiple) or, if you want no options, pass zero. The options include such features as localized comparison, case-insensitive comparison, and non-literal compariosn.

function result

A constant of type CFComparisonResult that indicates whether the first CFString object is equal to, less than, or greater than the second object.

DISCUSSION

The CFStringCompare compares the character contents of one CFString object with that of another CFString object. You can affect how the comparison proceeds by specifying one or more option flags. Not all comparison options are currently implemented.


© 1999 Apple Computer, Inc. — (Last Updated 9/15/99)