Creates a mutable copy of an attributed string.


CFMutableAttributedStringRef CFAttributedStringCreateMutableCopy(CFAllocatorRef alloc, CFIndex maxLength, CFAttributedStringRef aStr);



The allocator to be used to allocate memory for the new attributed string. Pass NULL or kCFAllocatorDefault to use the current default allocator.


The limit on the length of the new attributed string. The string starts empty and can grow to this length (it can be shorter).

Pass 0 to specify that the maximum length is not limited. If non-0, maxLength must be greater than or equal to the length of aStr.


The attributed string to copy.

Return Value

A mutable copy of aStr. Ownership follows the The Create Rule.

See Also

Creating a CFMutableAttributedString


Creates a mutable attributed string.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software