Returns a representation of the receiver using a given encoding to determine the percent escapes necessary to convert the receiver into a legal URL string.
- iOS 2.0–9.0Deprecated
- macOS 10.0–10.11Deprecated
- tvOS 9.0–9.0Deprecated
- watchOS 2.0–2.0Deprecated
The encoding to use for the returned string. If you are uncertain of the correct encoding you should use
A representation of the receiver using
encoding to determine the percent escapes necessary to convert the receiver into a legal URL string. Returns
encoding cannot encode a particular character.
It may be difficult to use this function to "clean up" unescaped or partially escaped URL strings where sequences are unpredictable. See
CFURLCreate for more information.