字符串和字符的值可以通过加法运算符 (+) 相加在一起并创建一个新的字符串值: let string1 = "hello" let string2 = " there" let character1: Character = "!" let character2: Character = "?" let stringPlusCharacter = string1 + character1 // 等于 "hello!&…
今天装了10.10.马上就可以实际编写swift了.还是很兴奋啊. 哈哈.字符串和字符是大家最容易打交道的.今天就转一下讲解swift中字符串和字符的文章.希望对大家有帮助. 原文地址:http://www.cocoachina.com/newbie/basic/2014/0606/8704.html Swift系列文章由CocoaChina翻译小组翻译自苹果的官方文档:The Swift Programming Language--Language Guide--Strings and Cha…
字符串和字符 A string is an ordered collection of characters, such as "hello, world" or "albatross". Swift strings are represented by the String type, which in turn represents a collection of values of Character type. Swift’s String and Char…