Contents

CFURLCopyParameterString(_:_:)

Returns the parameter string from a given URL.

Declaration

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

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

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

See Also

Accessing the Parts of a URL