Before I write the implementation for this NSString category method, I'd like to know if it's already already available somewhere:

@interface NSString (URIQuery)

/*!
 @method     queryDictionary
@abstract Assuming that the receiver is a query string of key=value pairs, of the form "key0=value0&key1=value1&...", with keys and values percent-escape
    encoded per RFC 2396, returns a dictionary of the keys and values.
@discussion If I recall correctly, ";" can also be used in place of the "&" delimiter
 */
- queryDictionary ;

@end

It seems like it would not be too difficult to implement using NSScanner and CFURLCreateStringByReplacingPercentEscapes(), but I've done enough things that "seemed like it would not be too difficult" to know that tested code is always preferable.

Thanks,

Jerry


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to