for c in str.characters{}只能打印最后的字母"d"

来源:4-1 Swift-String和Character

jameslam

2015-12-08 20:48

for c in str.characters

{

    print(c)

}

http://img.mukewang.com/5666d19e000171a705560392.jpg

只出来字符"d",请问要怎么才能遍历?


写回答 关注

1回答

  • ZYiOS
    2015-12-09 17:21:24
    已采纳

    用println

    jamesl... 回复ZYiOS

    原来在debug area可以看到,谢谢哈

    2015-12-09 19:53:37

    共 2 条回复 >

玩儿转Swift

这套教程比任何的Swift中文教程深入,并且演示示例更丰富

57197 学习 · 511 问题

查看课程

相似问题