How to convert string to array in objective C?

前端 未结 5 1195
不思量自难忘°
不思量自难忘° 2021-02-06 08:35

How to convert string to array in objective C. i.e,I have a string,

NSString *str = @\"Hi,How r u\";

This should be converted into an array *NS

5条回答
  •  遥遥无期
    2021-02-06 09:40

    I guess this link will help you.

    NSString *str = @"Hi,How r u";
    NSArray *listItems = [str componentsSeparatedByString:@","];
    

提交回复
热议问题