3
当试图使用+=
运营商追加Character
到String
,我收到以下错误:错误使用+ =一个字符追加到字符串:字符串是不完全相同的UINT8
String is not identical to UInt8
在下面的代码在puzzleOutput += char
行出现的错误:
let puzzleInput = "great minds think alike "
var puzzleOutput = ""
for char in puzzleInput
{
switch char
{
case "a","e","i","o","u":
continue
default:
puzzleOutput += char
}
}
println(puzzleOutput)
我怎么能追加Charater
到String
?
“thank you sir” – guri23 2014-09-25 01:58:04