Returns a new string made from the receiver by replacing all characters not in the specified set with percent-encoded characters.
Mac Catalyst 13.0+Beta
The characters not replaced in the string. Typically, you specify one of the predefined character sets for a particular URL component, such as urlPathAllowed or urlQueryAllowed.
Returns the encoded string, or nil if the transformation is not possible.
Entire URL strings cannot be percent-encoded, because each URL component specifies a different set of allowed characters. For example, the query component of a URL allows the “@” character, but that character must be percent-encoded in the password component.
UTF-8 encoding is used to determine the correct percent-encoded characters. Any characters in allowedCharacters outside of the 7-bit ASCII range are ignored.
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.
This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.