-1

Is there a way I could convert a String to an UnsafeMutablePointer<UInt8> in Swift language, avoiding data loss?

Martin R
  • 510,973
  • 84
  • 1,183
  • 1,314
ch_studend
  • 81
  • 10

1 Answers1

0
let s = "83"
var i: UInt8 = UInt8.init(s)!
let up: UnsafeMutablePointer<UInt8> = UnsafeMutablePointer<UInt8>.init(&i)
itlijunjie
  • 53
  • 1
  • 3