我有
Xcode 7 gm,swift 2.0是什么等效的表达式:
Let myNSString = "full text container" myNSString.substringWithRange(NSRange(location: 0,length: 3))
有了新的字符串类吗?
试试这个:
原文链接:https://www.f2er.com/swift/318896.htmllet myString = "full text container" myString[myString.startIndex..<myString.startIndex.advancedBy(3)]