将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】String转化为Array,Array转化为Stri
本文链接:https://www.haomeiwen.com/subject/augpoqtx.html
网友评论