Re: stringByAddingPercentEncodingWithAllowedCharacters: and friends
Re: stringByAddingPercentEncodingWithAllowedCharacters: and friends
- Subject: Re: stringByAddingPercentEncodingWithAllowedCharacters: and friends
- From: Greg Parker <email@hidden>
- Date: Fri, 10 Jan 2014 17:09:18 -0800
On Jan 10, 2014, at 4:41 PM, Shane Stanley <email@hidden> wrote:
> The Mavericks Foundation release notes say:
>
>> Added -stringByAddingPercentEncodingWithAllowedCharacters: and -stringByRemovingPercentEncoding. -stringByAddingPercentEncodingWithAllowedCharacters: is intended to percent-encode an URL component or subcomponent string, NOT the entire URL string. The predefined NSCharacters sets returned by +URLUserAllowedCharacterSet, +URLPasswordAllowedCharacterSet, +URLHostAllowedCharacterSet, +URLPathAllowedCharacterSet, +URLQueryAllowedCharacterSet, and +URLFragmentAllowedCharacterSet are intended to be passed to -stringByAddingPercentEncodingWithAllowedCharacters:.
>
> I can't see the NSString methods in NSString.h, and the "predefined NSCharacters sets" aren't listed in the class reference for NSCharacterSet, nor in NSCharacterSet.h. Anyone know where they live?
These are all in Foundation/NSURL.h.
--
Greg Parker email@hidden Runtime Wrangler
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden