I'm just wondering if there is a simpler way to find a substring within a string in Objective C.
My string is question is this: (messy I know...)
filename.cpp - line: 1 "comment 1"\nfilename.cpp - line: 1 "comment 2"\nfilename.cpp - line: 1 "comment 3"\n
So what I want to do is extract into an array all the bits between the quotation marks. I've been messing around with the componentsSeparatedByString method to try to manipulate the string enough to leave me with the "comments" but it just seems a very messy way to do it.
Thanks for any help!
NSScannerto parse the string or userangeOfStringto find the index of the quotes.