• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
URL parsing
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

URL parsing


  • Subject: URL parsing
  • From: "Ujwal S. Sathyam" <email@hidden>
  • Date: Sat, 06 Sep 2003 14:30:00 -0700

Hello,

Either I am being rather dense at the moment, or this NSURL class is singularly useless. I am hoping it is the former.

I am looking to parse a mailto URL that could look like this:

NSString *aURLString = @"mailto:Some One ?subject=some subject&body=some%body";;

NSURL *aURL = [NSURL URLWithString: aURLString];

Now, all I want to do is parse out the recipient, subject, and body so that:

NSString *recipient = @"Some One <email@hidden>"
NSString *subject = @"some subject"
NSString *body = @"some body"


None of the NSURL instance methods seem to do this. I tried parameterString, query, propertyForKey, etc, but they all return nil.

Do I end up having to do my own parsing, or am I doing something stupid?

Thanks,

Ujwal

--
Ujwal S. Sathyam
email@hidden
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: URL parsing
      • From: Scott Anguish <email@hidden>
  • Prev by Date: Re: JPEG and 72 dpi revisited...
  • Next by Date: Re: URL parsing
  • Previous by thread: Re: Rouge compile-time errors and warnings
  • Next by thread: Re: URL parsing
  • Index(es):
    • Date
    • Thread