A reference to a CFString object.
SDKs
- iOS 2.0+
- macOS 10.0+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
Framework
- Core Foundation
Declaration
typedef struct __CFString CFStringRef;
Overview
The CFString
type refers to a CFString object, which “encapsulates” a Unicode string along with its length. CFString is an opaque type that defines the characteristics and behavior of CFString objects.
Values of type CFString
may refer to immutable or mutable strings, as CFMutableString objects respond to all functions intended for immutable CFString objects. Functions which accept CFString
values, and which need to hold on to the values immutably, should call CFString
(instead of CFRetain
) to do so.