• 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
concatenating literal strings
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

concatenating literal strings


  • Subject: concatenating literal strings
  • From: Matt Neuburg <email@hidden>
  • Date: Wed, 7 Aug 2002 10:27:42 -0700

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.

So - is this documented somewhere? Are there any other cool basic tricks
like this that I ought to know by now (after more than a year of using
Cocoa)? m.
--

matt neuburg, phd = email@hidden, http://www.tidbits.com/matt
pantes anthropoi tou eidenai oregontai phusei
Subscribe to TidBITS! It's free and smart. http://www.tidbits.com/
_______________________________________________
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.

  • Follow-Ups:
    • Re: concatenating literal strings
      • From: Andy Lee <email@hidden>
  • Prev by Date: NSRunLoop and port
  • Next by Date: Re: enough of accessors - how about private method naming conventions in the real world?
  • Previous by thread: NSRunLoop and port
  • Next by thread: Re: concatenating literal strings
  • Index(es):
    • Date
    • Thread