• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: concatenating literal strings
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: concatenating literal strings


  • Subject: Re: concatenating literal strings
  • From: Andy Lee <email@hidden>
  • Date: Wed, 7 Aug 2002 14:06:13 -0400

At 10:27 AM -0700 8/7/02, Matt Neuburg wrote:
I've just discovered by accident that it's possible to concatenate two
literal NSStrings just by leaving a space between them:

NSString* s = @"Howdy " @"There";

Pretty cool, especially when a literal string is very long because now it
can easily be split across lines of code.

Cool! I knew you could do a similar thing with C strings:

char *s = "Howdy " "There";

I had hoped this would work with NSStrings:

NSString *s = @"Howdy " "There";

But of course it didn't.

Woo-hoo, no more lines running past column 80!

--Andy
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >concatenating literal strings (From: Matt Neuburg <email@hidden>)

  • Prev by Date: Inspector Windows
  • Next by Date: Re: Replacing Font/Size of NSMutableAttributedString, but not styles
  • Previous by thread: concatenating literal strings
  • Next by thread: Trouble resizing a scrollview programatically
  • Index(es):
    • Date
    • Thread