RE: NSScanner behavior
RE: NSScanner behavior
- Subject: RE: NSScanner behavior
- From: "Jonathan E. Jackel" <email@hidden>
- Date: Wed, 12 May 2004 14:42:35 -0400
Perhaps you'll do better with NSString's -componentsSeparatedByString:
method.
>
-----Original Message-----
>
From: email@hidden
>
[mailto:email@hidden]On Behalf Of Ibrahim Bulut
>
Sent: Wednesday, May 12, 2004 1:29 PM
>
To: email@hidden
>
Cc: Cocoa Dev List
>
Subject: Re: NSScanner behavior
>
>
>
I am aware of the setCharacterToBeSkipped, but if I set it nil, then
>
the scanning takes very long time to complete.
>
>
>
/Ibrahim
>
>
Somewhere in Texas... a village is missing their idiot.
>
>
On May 11, 2004, at 23:19, Jonathan E. Jackel wrote:
>
>
>> Hi there,
>
>>
>
>> It seems like when there is no data between fields, eg.
>
>> "field1;field2;field3;;;;;field8" NSScanner only recognise field1,
>
>> field2, field3 and field8 and skip the empty fields. Is this a bug? or
>
>> more important is there a workaround?
>
>
>
> One of NSScanner's easily overlooked "features" is that, by default, it
>
> skips characters in the whitespaceAndNewlineCharacterSet, which
>
> includes
>
> tabs (which you represent with semicolons above). You need to do:
>
>
>
> [theScanner setCharactersToBeSkipped:nil];
>
>
>
> And read the documentation for setCharactersToBeSkipped:.
>
>
>
> Jonathan
>
> _______________________________________________
>
> cocoa-dev mailing list | email@hidden
>
> Help/Unsubscribe/Archives:
>
> http://www.lists.apple.com/mailman/listinfo/cocoa-dev
>
> Do not post admin requests to the list. They will be ignored.
>
_______________________________________________
>
cocoa-dev mailing list | email@hidden
>
Help/Unsubscribe/Archives:
>
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
>
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.