swift 2中对advance做了一些改变,原来教程中的 let endIndex = advance(str.startIndex, 10) 应该写成 let endIndex = str.startIndex.advancedBy(10)
2015-10-07
func compareTwoString(s1:String, s2:String) -> Bool {
return countElements(s1) <= countElements(s2)
}
return countElements(s1) <= countElements(s2)
}
2015-09-23