NSString get text between certain characters
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!
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
精彩评论