Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3338532
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T00:23:14+00:00 2026-05-18T00:23:14+00:00

Part of my code will output HTML code to a file. I have a

  • 0

Part of my code will output HTML code to a file. I have a header that will be stamped in the beginning of all files. I would like to declare it as:

NSString *myHeader = @"
<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\n
  \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n
\n
<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\" lang=\"en\">\n
  <head>\n
    <meta http-equiv=\"content-type\" content=\"text/html;charset=UTF-8\" />\n
    <meta http-equiv=\"X-UA-Compatible\" content=\"chrome=1\">\n
        <title>My Title</title>\n
    <link rel=\"search\" type=\"application/opensearchdescription+xml\" href=\"/opensearch.xml\" title=\"GitHub\" />\n
    <link rel=\"fluid\" href=\"http://mysite.com/fluid.png\" title=\"fluid\" />\n
";

Obviously I have escaped the quotes, but even doing that, Xcode is not liking this string declaration spread on several lines. If possible I would like to keep it that way, instead of joining it on a long line that would be difficult to read and change.

How can I do that?

thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T00:23:15+00:00Added an answer on May 18, 2026 at 12:23 am

    Like this:

    NSString *myHeader = @"text here"
      @"more text here"
      @"even more text here"
      @"still more text";
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We all know that commenting our code is an important part of coding style
You know that particular part of your code that is essential for the project
As the title really, I'm in one part of my code and I would
Given the code from the Complex Form part III how would you go about
My Sharepoint 2007 web part executes code to start a K2 workflow process. The
It's a part of larger code base, which forces -Werror on gcc. This warning
Why is an exception being thrown in the f++ part of the code below
Note : The code in this question is part of deSleeper if you want
I was refactoring some code, and part of it included moving it from VB.Net
I'm working with some example java code for making md5 hashes. One part converts

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.