NSString *qwer2 = [qwer1 stringByReplacingOccurrencesOfString:@"count '0','" withString:@""];
NSString *qwer4 = [qwer2 stringByReplacingOccurrencesOfString:@"count '1','" withString:@""];
NSString *qwer = [qwer4 stringByReplacingOccurrencesOfString:@"count '2','" withString:@""];
如何用任何數字替換字符串?stringByReplacingOccurrencesOfString循環?
計數 '0',計數 '1',計數 '2'
計數 '的任何數字'
我已經嘗試過的循環:
for (int i =0; i<100; i++)
的NSString * qwer = [qwer4 stringByReplacingOccurrencesOfString:@「count'i','」withString:@「」];
這個問題有點不清楚。你是否試圖生成一個字符串列表,說Count 1 Count 2 Count 2等? (也應該用Objective-C來標記這個帖子) – Jeef
不,我想替換字符串「count」0,'' - >「」 – user3276854
並且有很多count'0'count'1'.... count'x' – user3276854