Objective c 将CSV中带引号的字符串转换为不带引号的NSMutableArray

Objective c 将CSV中带引号的字符串转换为不带引号的NSMutableArray,objective-c,nsstring,nsmutablearray,Objective C,Nsstring,Nsmutablearray,我对目标C有一个问题。我有以下NSString*名称,如下所示: "First Name","Second Name","Last Name"; 实际上,name是CSV的头,并从URL接收。我使用follow语句将语句分解为数组 NSMutableArray *csvTitleArray; csvTitleArray = [[name componentsSeparatedByString:@","]; 数组的结果是 [0] = "First Name" // the " is

我对目标C有一个问题。我有以下NSString*名称,如下所示:

 "First Name","Second Name","Last Name";
实际上,name是CSV的头,并从URL接收。我使用follow语句将语句分解为数组

NSMutableArray *csvTitleArray;
csvTitleArray = [[name componentsSeparatedByString:@","];
数组的结果是

[0] = "First Name"     // the " is part of the string, it means the first char of [0] is ", not F
[1] = "Second Name"
[2] = "Last Name"
但是,我想取消字符串开头和结尾的“the”(the)是字符串的一部分。有人能帮我吗?谢谢。

您是否想过使用该字符串,然后将其拆分为一个数组?

请看一下,常规CSV部分(代码示例)处理您的案例

有关解析数据的更多通用指针,请参阅