CFStringCreateArrayWithFindResults |
||||
Header: | CFString.h | Carbon status: | Supported | |
Searches a CFString object for multiple occurrences of a substring and creates an array of ranges identifying the locations of these substrings within the target string.
CFArrayRef CFStringCreateArrayWithFindResults ( CFAllocatorRef alloc, CFStringRef theString, CFStringRef stringToFind, CFRange rangeToSearch, CFOptionFlags compareOptions );
Pass a reference to the allocator used to create the CFArray object or pass NULL to request the default allocator.
Pass a reference to the CFString object to search for the substring.
Pass a reference to a CFString object containing the substring to search for.
Pass the range of characters within the source CFString object to be searched.
Pass one or more search-option flags (OR'd together if multiple).
A reference to a CFArray object that contains CFRange structures identifying the character locations of the requested substring in the source CFString object. If no matching substring is found in the source object, or if there was a problem creating the CFArray object, the result is NULL.
The CFStringCreateArrayWithFindResults function searches through all characters of a CFString object for one or more occurrences of a specified substring. If there are any matches, the function creates a CFArray object that holds the ranges (as CFRange structures) identifying the locations of the substrings within the target CFString object. It returns a reference to the CFArray object.
Supported in Carbon. Available in Carbon 1.0.2 and later.
© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)