字符串
let str =
"叼到飞起来"
for s in
str.characters {
print(s)
}
print(
str.characters.count)
let ocStr =
str as NSString
print(ocStr.length)
let firstName =
"Jerry"
let lastName =
"Yao"
let age =
18
let fullName = firstName + lastName
print(fullName)
let desc =
"Name is \(firstName) and age is \(age)"
print(desc)
let h =
3
let m =
4
let s =
8
let time = String(format:
"d:d:d", h, m, s)
print(time)