componentsJoinedByString 和 componentsSeparatedByString 的方法的区别

时间:2023-03-09 04:18:56
componentsJoinedByString 和 componentsSeparatedByString 的方法的区别

将string字符串转换为array数组

NSArray  *array = [Str componentsSeparatedByString:@","];

将array数组转换为string字符串

NSString *tempString = [mutableArray componentsJoinedByString:@","];--分隔符