I\'ve struggled and failed for over ten minutes here and I give in. I need to convert an Int to a Character in Swift and cannot solve it.
Question<
You can't convert an integer directly to a Character instance, but you can go from integer to UnicodeScalar to Character and back again:
Character
UnicodeScalar
let startingValue = Int(("A" as UnicodeScalar).value) // 65 for i in 0 ..< 26 { print(Character(UnicodeScalar(i + startingValue))) }