用于写入遍布多行的字符串的语法

时间:2012-05-13 18:07:15

标签: objective-c string-literals

我的代码中有一个字符串,我希望它看起来像这样:

NSString *string = @"The string
                          other part of the string is bellow
                          the last part is in the third line";

也就是说,为了使代码更具可读性,我想将文本放在几行上。我想我必须在换行后写一些符号,但不记得哪些符号。这些是什么?我搜索了很多,但我无法找到解决方案。

1 个答案:

答案 0 :(得分:2)

NSString *string = @"The string"
                      "other part of the string is bellow"
                      "the last part is in the third line";