Re: lots of find/replace in text file
Re: lots of find/replace in text file
- Subject: Re: lots of find/replace in text file
- From: "Gary L. Wade" <email@hidden>
- Date: Sat, 22 Jan 2011 16:15:34 -0800
The Mad Libs program I was working on just used the standard printf placeholders with the ordering parameters. When showing the parts of speech, I just supply "adjective." When showing the user's choice, I just supply "red."
- Gary L. Wade (Sent from my iPhone)
On Jan 22, 2011, at 6:19 AM, Jeremy Matthews <email@hidden> wrote:
> So...the app I previously mentioned, ala Mad Libs...I now have lots more text to replace within the file (new additions). Besides using find/replace using NSScanner and NSStrings' stringByReplacingOccurrencesOfString....is there a better way, to perform a slew of find/place operations with a text file?
>
> So far, I have an array of strings (placeholders) which get replaced by an array of user-determined values, and the resulting mishmash gets spewed into a file.
>
> I can't help but think there might be a better (and more efficient way) of handling this?
>
> Thanks,
> j
> _______________________________________________
>
> 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
_______________________________________________
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