Re: Dividing Strings
Re: Dividing Strings
- Subject: Re: Dividing Strings
- From: Hasan Diwan <email@hidden>
- Date: Mon, 13 Jan 2003 11:17:45 -0800
The Omni AppKit framework also has a Regex class (look in
OARegexFindPattern.h). While I'm on the subject, does anyone know of
sample code using the Omni frameworks?
Also, does anyone know of a good objective-C framework for IMAP e-mail
access? Pantomime does exist, but is quite FAR from being stable or
feature complete.
On Sunday, January 12, 2003, at 10:30 PM, Chuck Rice wrote:
>
Actually, it was not in the Docs. I tend to look far and wide. I read
>
it at:
>
>
<http://www.cocoadev.com/index.pl?NSScanner>
>
>
Not a very official source I guess. :) -Chuck-
>
>
>
> no.. it's not deprecated...
>
>
>
> if this was in the docs, let me know and I'll file a bug (and fix
>
> it.. :-)
>
>
>
>
>
> On Monday, January 13, 2003, at 12:53 AM, Chuck Rice wrote:
>
>
>
>> At 10:32 PM -0700 1/12/03, Alex Rice wrote:
>
>>> On Sunday, January 12, 2003, at 10:13 PM, Chuck Rice wrote:
>
>>>>
>
>>>> My question is, is there a better function to accomplish this, or
>
>>>> will I need to do the parsing the hard way with a loop, looking at
>
>>>> each character? Cocoa seems to have a really rich feature set, so
>
>>>> I thought there might be a better way. Any help would be
>
>>>> appreciated. I have spent a lot of time looking, but there is an
>
>>>> awful lot of doc to see. -Chuck-
>
>>>
>
>>> AFAIK there is no actual regular expressions support in Cocoa, but
>
>>> the next best thing is NSScanner, which you could definitely use to
>
>>> parse the records.
>
>>
>
>> Thanks. I am using NSScanner to parse the lines out:
>
>>
>
>> LineSet = [NSCharacterSet
>
>> characterSetWithCharactersInString:@"\r\n"];
>
>> lineScanner = [NSScanner scannerWithString:aString];
>
>>
>
>> while ([lineScanner isAtEnd] == NO) {
>
>> scanResult = [lineScanner scanUpToCharactersFromSet:LineSet
>
>> intoString:&aLine];
>
>> NSLog(@"-%@-",aLine);
>
>> listItems = [aLine componentsSeparatedByString:@","];
>
>> [lines addObject:listItems];
>
>> }
>
>>
>
>> But I read somewhere that it was Deprecated. Is that true? I did not
>
>> want to rely too much on it. -Chuck-
>
>> _______________________________________________
>
>> 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.
>
Hasan Diwan
OpenPGP KeyID: 0x7EE3855B
Fingerprint: 42F0 5758 C3EB BA1F ABD2 ED49 3390 CCF0 7EE3 855B
http://www.cs.rpi.edu/~diwanh/gpg.key
[demime 0.98b removed an attachment of type application/pgp-signature which had a name of PGP.sig]
_______________________________________________
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.