---
title: "CFURLGetString(_:)"
framework: corefoundation
role: symbol
role_heading: Function
path: "corefoundation/cfurlgetstring(_:)"
---

# CFURLGetString(_:)

Returns the URL as a CFString object.

## Declaration

```swift
func CFURLGetString(_ anURL: CFURL!) -> CFString!
```

## Parameters

- `anURL`: The CFURL object to convert into a CFString object.

## Return Value

Return Value A string representation of anURL. Ownership follows the get rule. See The Get Rule.

## See Also

### Converting URLs to Other Representations

- [CFURLCreateData(_:_:_:_:)](corefoundation/cfurlcreatedata(_:_:_:_:).md)
- [CFURLCreateStringByAddingPercentEscapes(_:_:_:_:_:)](corefoundation/cfurlcreatestringbyaddingpercentescapes(_:_:_:_:_:).md)
- [CFURLCreateStringByReplacingPercentEscapes(_:_:_:)](corefoundation/cfurlcreatestringbyreplacingpercentescapes(_:_:_:).md)
- [CFURLCreateStringByReplacingPercentEscapesUsingEncoding(_:_:_:_:)](corefoundation/cfurlcreatestringbyreplacingpercentescapesusingencoding(_:_:_:_:).md)
- [CFURLGetFileSystemRepresentation(_:_:_:_:)](corefoundation/cfurlgetfilesystemrepresentation(_:_:_:_:).md)
- [CFURLGetFSRef(_:_:)](corefoundation/cfurlgetfsref(_:_:).md)
