Creates a new string by replacing any percent escape sequences with their character equivalent.
- iOS 2.0–9.0Deprecated
- macOS 10.0–10.11Deprecated
- UIKit for Mac 13.0–13.0Deprecated
- tvOS 9.0–9.0Deprecated
- watchOS 2.0–2.0Deprecated
- Core Foundation
The allocator to use to allocate memory for the new
kto use the current default allocator.
CFStringobject to be copied and modified.
Characters whose percent escape sequences, such as
%20for a space character, you want to leave intact. Pass
NULLto specify that no percent escapes be replaced, or the empty string (
CFSTR("")) to specify that all be replaced.
Specifies the encoding to use when interpreting percent escapes. If you are uncertain of the correct encoding, you should use UTF-8 (
k), which is the encoding designated by RFC 3986 as the correct encoding for use in URLs.
CFString Encoding UTF8
CFString object, or
NULL if the percent escapes cannot be converted to characters, assuming the encoding given by
encoding. If no characters need to be replaced, this function returns the original string with its reference count incremented. Ownership follows the create rule. See The Create Rule.