Epps
2015-04-25 11:45
countElements在最新版的语法中是不是改成count了???然后现在的count方法要怎么使用
学习到了,O(∩_∩)O谢谢
let strValue1 = "床前明月光,疑是地上霜"
for c in strValue1.characters
{
print(c)
}
print("字数是:\(strValue1.characters.count)")
可是我发现:
let strValue1 = "床前明月光,疑是地上霜"
for c in strValue1.characters
{
print(c)
}
这样也能输出!
str.characters.count
str.characters.count
改了好多次。。希望早点稳定下来啊
var str = "Hello, playground"
str.characters.count
for c in str.characters{
print(c)
}
countElements has been renamed to count
到哪里去看更新的?
是的,改了
same count(s1)
玩儿转Swift
57181 学习 · 511 问题
相似问题