简单类型 / 字符类型

let c1: Character = "A"
let isLetter = c1.isLetter
let isNumber = c1.isNumber
let isSymbol = c1.isSymbol
//isLetter is true
//isNumber is false
//isSymbol is false

let c2: Character = "$"
let symbolList = "@#$%^&*"
let isInList = symbolList.contains(c2)
//isInList is true

print("isLetter is \(isLetter)")
print("isNumber is \(isNumber)")
print("isSymbol is \(isSymbol)")
print("isInList is \(isInList)")