---
title: "CFAttributedStringGetString(_:)"
framework: corefoundation
role: symbol
role_heading: Function
path: "corefoundation/cfattributedstringgetstring(_:)"
---

# CFAttributedStringGetString(_:)

Returns the string for an attributed string.

## Declaration

```swift
func CFAttributedStringGetString(_ aStr: CFAttributedString!) -> CFString!
```

## Parameters

- `aStr`: The attributed string to examine.

## Return Value

Return Value An immutable string containing the characters from aStr, or NULL if there was a problem creating the object. Ownership follows the The Get Rule.

## Discussion

Discussion For performance reasons, the string returned will often be the backing store of the attributed string, and it might therefore change if the attributed string is edited. However, this is an implementation detail, and you should not rely on this behavior.

## See Also

### Creating a CFAttributedString

- [CFAttributedStringCreate(_:_:_:)](corefoundation/cfattributedstringcreate(_:_:_:).md)
- [CFAttributedStringCreateCopy(_:_:)](corefoundation/cfattributedstringcreatecopy(_:_:).md)
- [CFAttributedStringCreateWithSubstring(_:_:_:)](corefoundation/cfattributedstringcreatewithsubstring(_:_:_:).md)
- [CFAttributedStringGetLength(_:)](corefoundation/cfattributedstringgetlength(_:).md)
