I’ve got a NSString *paragraph; which is filled with N number of words. In there I’m guaranteed to have:
…
First Name: David
Last Name: Johnson
…
What I need to do is find David and Johnson out of this string. However I don’t know what the name is ahead of time (David could be John, Chris, etc..)
In C# I’d just find the line starting with First Name: and then separate the words with a ” ” as a delimiter.. But I’m lost on how to do this in Objective-C
Any help would be greatly appreciated!
I would use a
NSScanner. Like this: