摘要: swift中集合类型有数组和字典数组和字典的区别是数组是有序的,字典类型是无序的 字典有key值1.数组的定义和更新数组的定义是Array 或者[sometype]var 山手线=["日暮里","鹰谷"]山手线.count 可以用来查看数组的个数山手线.isEmpty 可以用来判断数组是否是空的在数... 阅读全文
posted @ 2014-11-16 14:14 jiashu.ge 阅读(198) 评论(0) 推荐(0) 编辑
摘要: swift中的字符串和字符都兼容unicode定义一个字符串let hello="hello world"初始化一个空的字符串let hello=""let hello=String()判断一个字符串是否为空if hello.isEmpty{println("这是个空字符串")}字符串可以使用+进行... 阅读全文
posted @ 2014-11-16 11:53 jiashu.ge 阅读(298) 评论(0) 推荐(0) 编辑