How to convert string to array in objective C?

前端 未结 5 1213
不思量自难忘°
不思量自难忘° 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:27

    You can use the NSString method componentsSeparatedByString. Take a look at the reference here.

提交回复
热议问题