let str = "abc积分换地方叫对方吧由11234"
func hanziCount(str: String) -> Int {
var count = 0
for c in str where ("\u{4E00}" <= c && c <= "\u{9FA5}") {
count += 1
}
return count
}
print(hanziCount(str: str))
let str = "abc积分换地方叫对方吧由11234"
func hanziCount(str: String) -> Int {
var count = 0
for c in str where ("\u{4E00}" <= c && c <= "\u{9FA5}") {
count += 1
}
return count
}
print(hanziCount(str: str))