How to split items in a string separated by “,”

后端 未结 6 1420
栀梦
栀梦 2021-01-03 02:33

In my App, data comes in String like this

\"Hi,Hello,Bye\"

I want to separate data by \",\"

How can I do that?

6条回答
  •  甜味超标
    2021-01-03 03:26

    NSArray *components = [@"Hi,Hello,Bye" componentsSeparatedByString:@","];
    

    Apple's String Programming Guide will help you get up to speed.

提交回复
热议问题