As mentioned in this post, before Xcode 6 Beta 4, one could use c.isDigit() and c.isAlpha() to find if c : Character was a digit or al
c.isDigit()
c.isAlpha()
c : Character
Swift 3 seems a little easier:
let str = "abcdef12345" let digitSet = CharacterSet.decimalDigits for ch in str.unicodeScalars { if digitSet.contains(ch) { // is digit! } }