• 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
Re: NSString path manipulation methods
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >NSString path manipulation methods (From: Oliver Donald <email@hidden>)

  • Prev by Date: Re: more on stable sorting...
  • Next by Date: Setting RadioButton programatically
  • Previous by thread: Re: NSString path manipulation methods
  • Next by thread: Simple Semi-Transparent View?
  • Index(es):
    • Date
    • Thread