• 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: catching whitespace with scanner
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: catching whitespace with scanner


  • Subject: Re: catching whitespace with scanner
  • From: Stuart Malin <email@hidden>
  • Date: Wed, 6 May 2009 19:44:17 -1000


On May 6, 2009, at 7:08 PM, Daniel Child wrote:

I'm trying to catch whitespace between words with a scanner. For some
reason, the white space is not being recognized.
Am I missing something obvious or is there a bug here? Thanks.

NSScanner defaults to skipping whitespace and newlines.

Try adding the following after you declare your scanner but before you scan:

	[scanner setCharactersToBeSkipped:nil];		// don't skip whitespace!!

See the documentation for this method in the NSScanner Class Reference.
_______________________________________________

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


  • Prev by Date: Re: Strategy for acting on changes in child objects?
  • Next by Date: Re: Strategy for acting on changes in child objects?
  • Previous by thread: Re: catching whitespace with scanner
  • Next by thread: Strategy for acting on changes in child objects?
  • Index(es):
    • Date
    • Thread