---
title: "CFAttributedStringGetLength(_:)"
framework: corefoundation
role: symbol
role_heading: Function
path: "corefoundation/cfattributedstringgetlength(_:)"
---

# CFAttributedStringGetLength(_:)

Returns the length of the attributed string in characters.

## Declaration

```swift
func CFAttributedStringGetLength(_ aStr: CFAttributedString!) -> CFIndex
```

## Parameters

- `aStr`: The attributed string to examine.

## Return Value

Return Value The length of the attributed string in characters; this is the same as CFStringGetLength(CFAttributedStringGetString(aStr)).

## See Also

### Creating a CFAttributedString

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