1

I recently convert my Swift3 project into the new Swift4, and I got some warnings:

'substring(from:)' is deprecated: Please use String slicing subscript with a 
partial range from' operator.

Here is my code:

let index = row.index(row.startIndex, offsetBy: 1)
let substring = row.substring(from : index)

Could someone give me a clean solution for this warning?

Thank you!

IOS Singh
  • 617
  • 6
  • 15
Tudor Popa
  • 710
  • 5
  • 8

0 Answers0