美文网首页
swfit 数组直接赋值

swfit 数组直接赋值

作者: 码农淏 | 来源:发表于2018-04-12 13:57 被阅读17次

var data: [UInt8] = [UInt8].init(repeating: 0, count: 410)
printLog(data.count)
let header: [UInt8] = [0x44, 0x4D, 0xFF, 0xFF]
data.replaceSubrange(Range.init(0..<header.count), with: header)
printLog(data.count)
printLog(data)

相关文章

网友评论

      本文标题:swfit 数组直接赋值

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