'substring(from:)' is de

2017-12-06  本文已影响22人  Bruce__Liu
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
上一篇下一篇

猜你喜欢

热点阅读