http://stackoverflow.com/questions/30255402/swift-how-to-convert-a-string-to-uint8-array
let str = "test"
let byteArray = [UInt8](str.utf8)
本文介绍了一种在Swift中将字符串转换为UInt8数组的方法。通过实例演示了如何使用str.utf8创建数组,这对于处理二进制数据或底层字符编码操作特别有用。
http://stackoverflow.com/questions/30255402/swift-how-to-convert-a-string-to-uint8-array
let str = "test"
let byteArray = [UInt8](str.utf8)

被折叠的 条评论
为什么被折叠?