Function

CFAttributedStringGetMutableString

Gets as a mutable string the string for an attributed string.

Declaration

CFMutableStringRef CFAttributedStringGetMutableString(CFMutableAttributedStringRef aStr);

Parameters

str

The mutable attributed string from which to retrieve the string.

Return Value

The string for the specified attributed string as a mutable string.

Discussion

This function allows you to edit the character contents of the attributed string as if it were a CFMutableString. Attributes corresponding to the edited range are appropriately modified. If, as a result of the edit, new characters are introduced into the string, they inherit the attributes of the first replaced character from range. If no existing characters are replaced by the edit, the new characters inherit the attributes of the character preceding range if it has any, otherwise of the character following range. If the initial string is empty, the attributes for the new characters are also empty.

See Also

Modifying a CFMutableAttributedString

CFAttributedStringBeginEditing

Defers internal consistency-checking and coalescing for a mutable attributed string.

CFAttributedStringEndEditing

Re-enables internal consistency-checking and coalescing for a mutable attributed string.

CFAttributedStringRemoveAttribute

Removes the value of a single attribute over a specified range.

CFAttributedStringReplaceString

Modifies the string of an attributed string.

CFAttributedStringReplaceAttributedString

Replaces the attributed substring over a range with another attributed string.

CFAttributedStringSetAttribute

Sets the value of a single attribute over the specified range.

CFAttributedStringSetAttributes

Sets the value of attributes of a mutable attributed string over a specified range.