views:

21

answers:

1

If I have an NSString with something like this in it: Note Title Here:@:Note Description Here:@:123839:@:High Priority How can I separate out the strings between the ":@:" characters? I would know how many segments to expect if using something other than an array/for-loop would be easier.

Thanks!

+1  A: 

Take at look at the componentsSeparatedByString: method. It should do what you want

[myString componentsSeparatedByString: @":@:"]

should give you an NSArray instance containing the parts of the string split out

Daniel