-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Open
Description
Location
https://doc.swiftgg.team/documentation/the-swift-programming-language/stringsandcharacters
Description
章节《字符和字符串》中,扩展字符串和分隔符段落中,
在字符串字面值中,如果您需要某个字符的特殊效果,需使字符串中紧跟转义字符(\)后的井号(#)数量相匹配。例如,如果您的字符串是 #"Line 1\nLine 2"# 并且您想要换行,可以使用 #"Line 1#nLine 2"# 替代。同样,###"Line1###nLine2"### 也能实现换行效果。代码 ###"Line1###nLine2"### 缺少\,正确为###"Line1\###nLine2"###,应该是显示错误
Correction
No response
Metadata
Metadata
Assignees
Labels
No labels