Re: NSString path manipulation methods
Re: NSString path manipulation methods
- Subject: Re: NSString path manipulation methods
- From: "Clark S. Cox III" <email@hidden>
- Date: Fri, 22 Nov 2002 07:58:34 -0500
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Friday, Nov 22, 2002, at 04:53 US/Eastern, Oliver Donald 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?
Yes, the methods in NSPathUtilities.h work on filesystem paths, not
URLs.
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.
It looks like you're either going to have to stick with your
hand-rolled version, or go to using NSURLs.
- --
http://homepage.mac.com/clarkcox3/
email@hidden
Clark S. Cox, III
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (Darwin)
iEYEARECAAYFAj3eKf8ACgkQd6STocYT1xWsawCeIc5hlZxZb3gjZ9R1SWILc5dT
UaEAoIE3aNpACpDUFGJ7FhFxZSGwq7/f
=Vsas
-----END PGP SIGNATURE-----
_______________________________________________
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.