• 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: NSScanner Madness
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSScanner Madness


  • Subject: Re: NSScanner Madness
  • From: "M. Uli Kusterer" <email@hidden>
  • Date: Tue, 7 Dec 2004 08:46:19 +0100

At 7:05 Uhr +0100 07.12.2004, Malte wrote:
So somehow i need my NSScanner to grind through the entire string, look at each character as an NSString object, look up its equivalent value in my NSDictionary and write that value into my translation string which shall finally be displayed to the user.

Actually, I think it'd be overkill to use NSScanner here. NSScanner is for cases where you want to do more complex things, thus as skip whitespace or so.


In your case I'd just loop over the characters of your source string using characterAtIndex: and do the replace that way.
--
Cheers,
M. Uli Kusterer
------------------------------------------------------------
"The Witnesses of TeachText are everywhere..."
http://www.zathras.de
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden
References: 
 >NSScanner Madness (From: Malte <email@hidden>)

  • Prev by Date: Re: [[NSNotificationCenter defaultCenter] postNotificationName:...] in a C function get error
  • Next by Date: nsmovieview and movie cursor position
  • Previous by thread: Re: NSScanner Madness
  • Next by thread: nsmovieview and movie cursor position
  • Index(es):
    • Date
    • Thread