将string字符串转换为array数组
NSArray *array = [str componentsSeparatedByString:@","];
将array数组转换为string字符串
NSString *str = [array componentsJoinedByString:@","];
将string字符串转换为array数组
NSArray *array = [str componentsSeparatedByString:@","];
将array数组转换为string字符串
NSString *str = [array componentsJoinedByString:@","];
本文标题:iOS 数组与字符串的转化(有分隔符)
本文链接:https://www.haomeiwen.com/subject/ktbvgxtx.html
网友评论