Function

CFAttributedStringCreateCopy

Creates an immutable copy of an attributed string.

Declaration

CFAttributedStringRef CFAttributedStringCreateCopy(CFAllocatorRef alloc, CFAttributedStringRef aStr);

Parameters

alloc

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

aStr

The attributed string to copy.

Return Value

An immutable attributed string with characters and attributes identical to those of aStr. Returns NULL if there was a problem copying the object. Ownership follows the The Create Rule.

See Also

Creating a CFAttributedString

CFAttributedStringCreate

Creates an attributed string with specified string and attributes.

CFAttributedStringCreateWithSubstring

Creates a sub-attributed string from the specified range.

CFAttributedStringGetLength

Returns the length of the attributed string in characters.

CFAttributedStringGetString

Returns the string for an attributed string.