Re: NSString path manipulation methods
Re: NSString path manipulation methods
- Subject: Re: NSString path manipulation methods
- From: Kris Amico <email@hidden>
- Date: Fri, 22 Nov 2002 02:30:46 -0800
Have you tried using NSURL to access the URL's resource specifier or path
and processing that? The behavior you are experiencing with
stringByDeletingLastPathComponent is completely normal, so processing the
URL's components instead of the whole URL may be your best bet.
On 11/22/02 1:53 AM, "Oliver Donald" <email@hidden> wrote:
>
Hi,
>
My first app is nearly complete, but currently URL's are stored as strings
>
as they are extracted from HTML source in another NSString.
>
>
NSStrings handle URL's fine, but a few of the path operations screw parts of
>
the URL up. I am using -(NSString *)stringByDeletingLastPathComponent, and
>
this converts any instance of double-slashes (such as in
>
'http://www.apple.com') into single slashes (giving 'http:/www.apple.com').
>
Is there a reason for this? Is there a simple way to get around it? I've
>
rolled my own but its nasty.
>
I would use NSURL's the whole time, but 90% of the processing on them is
>
string-operations, so using URL's would result in many more conversions.
>
>
Any help appreciated,
>
Thanks,
>
Oli
>
_______________________________________________
>
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.
--
Kris Amico <email@hidden>, AIM: Kris Amico
Senior Software Engineer
Macintosh Client Software Development
EarthLink, Inc.
_______________________________________________
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.