1.截取前两个字符串
let htmlIndex = htmlString.index(htmlString.startIndex,offsetBy: 2)
htmlString = htmlString.substring(to: htmlIndex)
2. 获取字符串的字符长度
htmlString.characters.count