Lukas
Lukas

Reputation: 2535

Syntax for writing strings spread over multiple lines

I have a string in my code and I want it to appear like this:

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

That is, in order to make the code more readable, I want to situate the text on several lines. I think I have to write some symbols after the line breaks, but can't remember which ones. What are they? I've searched quite a lot, but I can't a find solution.

Upvotes: 1

Views: 180

Answers (1)

Vitaly
Vitaly

Reputation: 714

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

Upvotes: 2

Related Questions