Splitting strings....
Splitting strings....
- Subject: Splitting strings....
- From: Jerry LeVan <email@hidden>
- Date: Fri, 27 Feb 2004 20:18:42 -0500
Hi,
I have suddenly developed a need to be able to split a NSString on a ";"
The rub comes in that the semicolon does not count if it is *in* a
quoted string.
Also a string can contain a quote character if it is doubled...
So.
blah blah 'I can''t stand '';'' this ;' foolishness ; any ; more
will split into:
blah blah 'I can''t stand '';'' this ;' foolishness
and
any
and
more
I am not to keen on scanning the string char at a time and keeping
track of the
uncovered semicolons....
Any one tackled this problem before? Is there an elegant solution?
--Jerry
_______________________________________________
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.