let newStr = String(str[..<index]) // = str.substring(to: index) In Swift 3
let newStr = String(str[index...]) // = str.substring(from: index) In Swif 3
let newStr = String(str[range]) // = str.substring(with: range) In Swift 3

相关文章:

  • 2021-09-26
  • 2021-08-15
  • 2021-10-23
  • 2021-05-07
  • 2022-12-23
  • 2021-11-26
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-11-15
  • 2021-08-01
  • 2022-12-23
  • 2022-12-23
  • 2021-03-31
  • 2022-02-11
  • 2022-03-09
相关资源
相似解决方案