'substring(from:)' is deprecated: Please use String slicing subscript with a 'partial range from' operator.
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)InSwift3