• 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: lots of find/replace in text file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >lots of find/replace in text file (From: Jeremy Matthews <email@hidden>)

  • Prev by Date: Re: starting with Cocoa!
  • Next by Date: Cocoa Drawing vs. Quartz Drawing
  • Previous by thread: lots of find/replace in text file
  • Next by thread: Re: lots of find/replace in text file
  • Index(es):
    • Date
    • Thread