NSArray *arr = @[@1,@2,@3,@"abc"];
NSLog(@"%@", arr);
NSLog(@"description:%@", [arr description]);
/*
兩種方式都輸出如下,被加上換行符號
(
1,
2,
3,
abc
)
*/
改成componentsJoinedByString
NSLog(@"%@", [arr componentsJoinedByString:@","]);
//1,2,3,abc
NSArray *arr = @[@1,@2,@3,@"abc"];
NSLog(@"%@", arr);
NSLog(@"description:%@", [arr description]);
/*
兩種方式都輸出如下,被加上換行符號
(
1,
2,
3,
abc
)
*/
改成componentsJoinedByString
NSLog(@"%@", [arr componentsJoinedByString:@","]);
//1,2,3,abc