I have just coverted an app from swift3 to swift4.2 on Xcode 10.1
I am in the process of fixing some of the many errors that have appeared. Apparently substring(from:)' is deprecated. Use string slicing subscript with a 'partial range from' operator
t_prefix_phone = contact_phone.substring(to:contact_phone.index(contact_phone.startIndex, offsetBy: 3))
t_phone = contact_phone.substring(from:contact_phone.index(contact_phone.endIndex, offsetBy: -7))
Could you please help me translate the code above to 4.2 in such a way that the results are still strings.
Thanks