Just plugging in some code from the Swift documentation and ran through a few issues. I can declare a variable with the Character datatype and it will compile fine.
var letter2: Character
print(typeOf(letter2)) // Swift.Character
But as soon as I attempt to initialize it, I receive an error.
letter2 = "a" // Type mismatch, expected ‘Character’
Same error occurs when declaring and initializing a Character datatype.
var letter1: Character = "s" // Type mismatch, expected ‘Character’
Only ToDo left is to enface that the assigned string is, in fact, a single Unicode character. a lot easier said than done; I have code for that in Elements RTL, but right now Swift Base Library doesn’t depend on Elements RTl. Maybe the time has finally come to change that…