• 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: C: treated as a path component
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: C: treated as a path component


  • Subject: Re: C: treated as a path component
  • From: Keary Suska <email@hidden>
  • Date: Wed, 15 Apr 2009 09:51:07 -0600

On Apr 14, 2009, at 5:57 PM, Dragan Milić wrote:

Hell all,

Let's suppose I've got NSString @"C:omponent" , which represents the name of a file. Is there a way to instruct NSString class not to treat a leading single letter followed by a column as a path separator? Namely, I need this one treated as only one path component @"C:omponent", but NSString sees two, @"C:" and "omponent". So, if I ask for the last path component, I get @"omponent" instead of the whole string @"C:omponent".

I don't believe so, as I believe colon-separators are are deeply ingrained into the file system. You will probably need to parse the path names yourself. Look at one of the regex libraries for easy parsing.


"Carbon is not dead, it just smells funny."

Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:
This email sent to email@hidden


  • Follow-Ups:
    • Re: C: treated as a path component
      • From: Charles Srstka <email@hidden>
References: 
 >C: treated as a path component (From: Dragan Milić <email@hidden>)

  • Prev by Date: Re: unrecognized selector sent to instance
  • Next by Date: Re: C: treated as a path component
  • Previous by thread: C: treated as a path component
  • Next by thread: Re: C: treated as a path component
  • Index(es):
    • Date
    • Thread