I'm trying to append Character to String using "+=", but It doesn't really work. Once I tried with append method, it works. I just wonder why it is. The compiler says "string is not identical to Unit8".
let puzzleInput = "great minds think alike"
var puzzleOutput = " "
for character in puzzleInput {
switch character {
case "a", "e", "i", "o", "u", " ":
continue
default:
// error : doesn't work
puzzleOutput += character
//puzzleOutput.append(character)
}
}
println(puzzleOutput)
characteraStringfirst:puzzleOutput += String(character).