swift 中的运算符
import Foundation//字符类型var char: Character = "a"char="b"println(char)var str:Stringstr="abcceadfasdfl;jk\0dfaaaa 0001496"println(str)//查看长度 countElements 返回的元素个数println(countElements(str))var str1="hrllo"println(str1+" world")//字符串格式化 \(字符串、变量、表达式)var index="abc"var message="http://www.baidu.com/tag=\(index).png"println(message)//字符串的比较 比较的是编码,不是内容let m_s1="heLlo"let m_s2="hello world"if m_s1 == m_s2{ println("等于")}if m_s1 >= m_s2{ println("大于等于")}if m_s1 <= m_s2{ println("小于等于")}if m_s1 < m_s2{ println("小于")}if m_s1 > m_s2{ println("大于")}if m_s1.hasSuffix("lo"){ println("后缀")}if m_s1.hasPrefix("he"){ println("前缀")}println(m_s1.lowercaseString+"转小写")println(m_s1.uppercaseString+"转大写")//类型转化var n_s1="255"println(n_s1.toInt())//得到的是一个可选值//闭合区间运算符 (a...b)for _ in (1...5){ // println("hello")}for i in (1...5){ println("hello"+String(i))}//半闭区间运算符 (a..