我最近将我的Swift3项目转换为新的Swift4,我收到了一些警告:
'substring(from:)' is deprecated: Please use String slicing subscript with a
partial range from' operator.
这是我的代码:
let index = row.index(row.startIndex, offsetBy: 1)
let substring = row.substring(from : index)
有人能给我一个干净的解决方案吗?
谢谢!