我的主力博客:半亩方塘
Strings
It's possible to add characters to a string. However,Swift's strictness with types means you have to be explicit when doing so,just as you have to be when you work with numbers if one is anInt
and the other is aDouble
.
To add a character to a string,you do this:
let exclamationMark: Character = "!" var message = "Hello" + " my name is Matt" message += String(exclamationMark)原文链接:https://www.f2er.com/swift/324525.html