---
title: "CFAttributedStringCreateMutable(_:_:)"
framework: corefoundation
role: symbol
role_heading: Function
path: "corefoundation/cfattributedstringcreatemutable(_:_:)"
---

# CFAttributedStringCreateMutable(_:_:)

Creates a mutable attributed string.

## Declaration

```swift
func CFAttributedStringCreateMutable(_ alloc: CFAllocator!, _ maxLength: CFIndex) -> CFMutableAttributedString!
```

## Parameters

- `alloc`: An allocator to be used to allocate memory for the new attributed string. Pass NULL or kCFAllocatorDefault to use the current default allocator.
- `maxLength`: 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. The value must not be negative.

## Return Value

Return Value A new mutable attributed string. Ownership follows the The Create Rule.

## See Also

### Creating a CFMutableAttributedString

- [CFAttributedStringCreateMutableCopy(_:_:_:)](corefoundation/cfattributedstringcreatemutablecopy(_:_:_:).md)
