---
title: "CFURLCopyParameterString(_:_:)"
framework: corefoundation
role: symbol
role_heading: Function
path: "corefoundation/cfurlcopyparameterstring(_:_:)"
---

# CFURLCopyParameterString(_:_:)

Returns the parameter string from a given URL.

## Declaration

```swift
func CFURLCopyParameterString(_ anURL: CFURL!, _ charactersToLeaveEscaped: CFString!) -> CFString!
```

## Parameters

- `anURL`: The CFURL object to examine.
- `charactersToLeaveEscaped`: Characters whose percent escape sequences, such as %20 for a space character, you want to leave intact. Pass NULL to specify that no percent escapes be replaced, or the empty string (CFSTR("")) to specify that all be replaced.

## Return Value

Return Value The parameter string (as defined in RFC 1738), or NULL if no parameter string exists. For example, in the URL myproto://www.example.com/;command=laugh, the parameter string is command=laugh. Ownership follows the create rule. See The Create Rule.

## Discussion

Discussion This function removes all percent escape sequences except those for characters specified in charactersToLeaveEscaped.

## See Also

### Accessing the Parts of a URL

- [CFURLCanBeDecomposed(_:)](corefoundation/cfurlcanbedecomposed(_:).md)
- [CFURLCopyFileSystemPath(_:_:)](corefoundation/cfurlcopyfilesystempath(_:_:).md)
- [CFURLCopyFragment(_:_:)](corefoundation/cfurlcopyfragment(_:_:).md)
- [CFURLCopyHostName(_:)](corefoundation/cfurlcopyhostname(_:).md)
- [CFURLCopyLastPathComponent(_:)](corefoundation/cfurlcopylastpathcomponent(_:).md)
- [CFURLCopyNetLocation(_:)](corefoundation/cfurlcopynetlocation(_:).md)
- [CFURLCopyPassword(_:)](corefoundation/cfurlcopypassword(_:).md)
- [CFURLCopyPath(_:)](corefoundation/cfurlcopypath(_:).md)
- [CFURLCopyPathExtension(_:)](corefoundation/cfurlcopypathextension(_:).md)
- [CFURLCopyQueryString(_:_:)](corefoundation/cfurlcopyquerystring(_:_:).md)
- [CFURLCopyResourceSpecifier(_:)](corefoundation/cfurlcopyresourcespecifier(_:).md)
- [CFURLCopyScheme(_:)](corefoundation/cfurlcopyscheme(_:).md)
- [CFURLCopyStrictPath(_:_:)](corefoundation/cfurlcopystrictpath(_:_:).md)
- [CFURLCopyUserName(_:)](corefoundation/cfurlcopyusername(_:).md)
- [CFURLGetPortNumber(_:)](corefoundation/cfurlgetportnumber(_:).md)
