【1】数组转字符串
NSString *string = [array componentsJoinedByString:@","]; //,为分隔符
【2】字符串转数组
NSArray *array = [string componentsSeparatedByString:@","]; //,为分隔符
【1】数组转字符串
NSString *string = [array componentsJoinedByString:@","]; //,为分隔符
【2】字符串转数组
NSArray *array = [string componentsSeparatedByString:@","]; //,为分隔符
本文标题:ios开发数组与字符串互转
本文链接:https://www.haomeiwen.com/subject/wfnlectx.html
网友评论