After converting my Swift 3 project to Swift 4 I received the warning:
‘substring(from:)’ is deprecated: Please use String slicing subscript with a ‘partial range from’ operator.
The old Swift 3 code was
let range = str.range(of:"Some ") let index = range!.upperBound let subStr = str.substring(from: index)
The new Swift 4 code for substring is:
let str = "Some String" let range = str.range(of:"Some ") let index = range!.upperBound let subStr = String(str[index...])
Keyword level attribution for Apple Search Ads. Optimize your bids and increase your revenue. Sign up for free at kitemetrics.com.
The free podcast that puts you to sleep with meditative bedtime stories. Listen at getsleepy.com.