Swift 字符串转换 C String char * UnsafeMutablePointer
C语言char*指针在Swift 中对应的结构为UnsafeMutablePointer<Int8>由Swift的字符串inputText:String得到pointer(即char*)的过程如下: let charArray = inputText.cString(using: .utf8)! let length = charArray.count let pointer = Unsaf...
原创
2020-10-03 00:47:01 ·
2387 阅读 ·
21 评论