I generally use NSURL's -path method.  If you then need the resulting string as 
a char*, then you can use -[NSString fileSystemRepresentation]

Dave

On Jul 28, 2010, at 12:39 PM, JanakiRam Palepu wrote:

> **
> 
> Hi folks,
> 
> 
> I've been trying to extract  NSString from a URL like string , as specified
> below.
> 
> 
> Input String:
> 
> *file://localhost/Users/admin/Music/iTunes/*
> 
> 
> I've tried couple of options.
> 
> 
> 1. Created a NSURL from the string and extracting the string
> with absoluteString method.
> 
> 2. Manually removing the "file://localhost" from the above one using
> standard NSString utility methods.
> 
> 
> I would like to achieve this via standard coco approach. Can any one provide
> some pointers on getting the below output.
> 
> 
> 
> Output String:
> 
> */Users/admin/Music/iTunes/*
> 
> 
> - Janakiram
> _______________________________________________
> 
> Cocoa-dev mailing list ([email protected])
> 
> 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/davedelong%40me.com
> 
> This email sent to [email protected]

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

Cocoa-dev mailing list ([email protected])

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