我想用逗號作爲逗號分隔字符串作爲分隔符,並且結果必須存儲在字符串中...... comma = @「,」; (i = 0; i < [resources count]; i ++) { Record * aRecord = [resources objectAtIndex:i];如何將值連接到字符串
temp=aRecord.programID;
if(i==0)
pid=temp;
else
//i am using this one to cancatenate but is not working why?
pid = [NSString stringWithFormat:@「%@%@%@」,pid,comma,temp]; }
你沒有說清楚。你有什麼形式的字符串串聯?你想對結果做什麼?顯示一些代碼。 – 2010-08-14 15:45:47