我正在快速处理字符串。但是当我想将 String.UTF8View.Index 转换为 String.CharacterView.Index 时,我遇到了一些麻烦。有人知道该怎么做吗?提前致谢!
最佳答案
使用以下初始化函数:
String.Index.init(utf8Index: UTF8Index##UTF8Index#>, within: <#T##String#>)
在这个函数中你必须使用字符串作为参数。
关于ios - 如何将 String.UTF8View.Index 转换为 String.CharacterView.Index?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34630386/