解决方法
不会.正如Swift编程语言介绍的词汇结构中所述,string literals包含在一对引号中,不得包含换行符.
语法指定:
string-literal → ” quoted-text “
quoted-text → quoted-text-item quoted-text opt
quoted-text-item → escaped-character
quoted-text-item → ( expression )
quoted-text-item → Any Unicode extended grapheme cluster except ”,\,U+000A,or U+000D
[…]
其中U 000A和U 000D分别是换行符和回车符.
目前,没有其他类型的字符串文字.