将字符串切割成数组&将数组元素拼接成字符串

#componentsJoinedByString 和 componentsSeparatedByString 的方法的区别

  1. 将string字符串转换为array数组

    NSArray  *array = [Str componentsSeparatedByString:@","];
    
  2. 将array数组转换为string字符串

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