Objective-C - Parsing a CSV into a array

為{幸葍}努か 提交于 2020-01-02 03:15:05

问题


How would I parse a CSV into an array. Its only a one column spread sheet I converted into an CSV so it shouldn't be too hard right?

Any way how do I do this?


回答1:


Use a proper CSV parser such as https://github.com/davedelong/CHCSVParser




回答2:


you can do this

new_array *new_obj = [csv_array componentsSeparatedByString:@","];

Hope it helps!!!!



来源:https://stackoverflow.com/questions/3286254/objective-c-parsing-a-csv-into-a-array

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!