Swift代码库之如何将String转换为unicode编码
2019-08-06 本文已影响6人
iCloudEnd
Swift代码库之如何将String转换为unicode编码
var myString = ""
for scalar in myString.unicodeScalars {
print(String(scalar.value, radix: 16))
}
var myString = ""
for scalar in myString.unicodeScalars {
print(String(scalar.value, radix: 16))
}