1、字符串截取,截取字符串从m到n位置的字符串
let index = self.titleString.startIndex
let staetIndex = self.titleString.index(index, offsetBy: m)
let endIndex = self.titleString.index(index, offsetBy: n)
self.titleLabel.text = String(self.titleString[staetIndex...endIndex])
网友评论