---
title: "CFDataGetLength(_:)"
framework: corefoundation
role: symbol
role_heading: Function
path: "corefoundation/cfdatagetlength(_:)"
---

# CFDataGetLength(_:)

Returns the number of bytes contained by a CFData object.

## Declaration

```swift
func CFDataGetLength(_ theData: CFData!) -> CFIndex
```

## Parameters

- `theData`: The CFData object to examine.

## Return Value

Return Value An index that specifies the number of bytes in theData.

## See Also

### Examining a CFData Object

- [CFDataGetBytePtr(_:)](corefoundation/cfdatagetbyteptr(_:).md)
- [CFDataGetBytes(_:_:_:)](corefoundation/cfdatagetbytes(_:_:_:).md)
- [CFDataFind(_:_:_:_:)](corefoundation/cfdatafind(_:_:_:_:).md)
