美文网首页
'substring(from:)' is de

'substring(from:)' is de

作者: Bruce__Liu | 来源:发表于2017-12-06 11:17 被阅读22次
    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
    

    相关文章

      网友评论

          本文标题:'substring(from:)' is de

          本文链接:https://www.haomeiwen.com/subject/soekixtx.html