简单类型 / 字符串

let str = "Lower and upper"

let lower = str.lowercased()
//lower is "lower and upper"

let upper = str.uppercased()
//upper is "LOWER and UPPER"

let capitalize = str.capitalized
//capitalize is "Lower And Upper"

print("lower is '\(lower)'"
print("upper is '\(upper)'")
print("capitalize is '\(capitalize)'")