美文网首页
Swift 3.0字符串 根据某些文字,截取字符串 生成数组

Swift 3.0字符串 根据某些文字,截取字符串 生成数组

作者: 梁同桌 | 来源:发表于2016-12-06 14:22 被阅读20次
    let str = http://ac-rujdcqwh.clouddn.com/b2bbde962fd70acaff5e.jpg", "http://ac-rujdcqwh.clouddn.com/h4xPPTS1N5e1BEpPifduBTD"

    let strArray = str.components(separatedBy: ",")//拆分为数组

   print(strArray)
//打印
//["http://ac-rujdcqwh.clouddn.com/b2bbde962fd70acaff5e.jpg", "http://ac-rujdcqwh.clouddn.com/h4xPPTS1N5e1BEpPifduBTD"]

- -给力

相关文章

网友评论

      本文标题:Swift 3.0字符串 根据某些文字,截取字符串 生成数组

      本文链接:https://www.haomeiwen.com/subject/fnlrmttx.html