Samuli Lehtonen
Samuli Lehtonen

Reputation: 3860

NSString cutting one string to pieces

So, I am making an item class to my project and I want to have keywords to search it in my search tab, I read that you can't put arrays to coreData, so I thought I put a string and seperate keywords with ,

So how would I read that string then and cut it to smaller pieces? Or is there a better way to do this?

Upvotes: 1

Views: 498

Answers (1)

Caleb
Caleb

Reputation: 125007

Look at NSString's -componentsSeparatedByString: and -componentsSeparatedByCharactersInSet: methods.

Upvotes: 5

Related Questions