Re: Re: NSString, path and "/" char
Re: Re: NSString, path and "/" char
- Subject: Re: Re: NSString, path and "/" char
- From: "Clark Cox" <email@hidden>
- Date: Fri, 24 Nov 2006 10:47:54 -0500
On 11/24/06, Trygve Inda <email@hidden> wrote:
> Filenames on MacOSX cannot contain '/', period. Any time the
> Finder/file selection dialog shows a file with '/' in the name, that
> is actually a ':' in the filename.
>
> So, if the user wants you to put a '/' in a filename, simply replace
> it with a ':'. If the user wants a ':' in the filename, either don't
> allow it, or pass it through unchanged (in which case the user will
> see a ':' if they look at the file in the Terminal, and a '/' if they
> look at the file in the GUI).
Is there a find and replace method for NSString?
I see characterAtIndex, but no setCharacterAtIndex.
NSStrings are immutable, but you can use the NSMutableString class,
and the -replaceOccurrencesOfString:withString:options:range: method.
--
Clark S. Cox III
email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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