NSString跟SwiftString的区别和使用场景

2025-04-05 06:22:49
推荐回答(1个)
回答1:

var str = "hello, world" str.utf8.startIndex var byteArray = [Byte]() for char in str.utf8{ byteArray += char } println(byteArray) 可以参阅Swift官方文档:developer.apple/library/prerelease/ios/documentation/Swift/Co