• 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: Is Concatenation that complex?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Is Concatenation that complex?


  • Subject: Re: Is Concatenation that complex?
  • From: Sherm Pendley <email@hidden>
  • Date: Thu, 22 Apr 2004 23:15:05 -0400

On Apr 22, 2004, at 10:58 PM, Adam wrote:

From what I have read in Obj-C I have to do this:

NSString* cookieString = [[NSString alloc] initWithFormat:@"%d", cookie];
NSString* pClose = @")";
NSString* pOpen = @"(";
NSString* CookiePOpen = [pOpen stringByAppendingString:cookieString];
NSString* PCloseCookiePOpen = [CookiePOpen stringByAppendingString:pClose];
NSString* messageString2 = [messageString stringByAppendingString:PCloseCookiePOpen];

It seams like a lot of work to do something simple. Is there a better way?

Format specifiers can include whatever literal text you want, in addition to the %x placeholders. So:

NSString *cookieString = [[NSString alloc] initWithFormat: @"(%d)", cookie];

sherm--
_______________________________________________
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: 
 >Is Concatenation that complex? (From: Adam <email@hidden>)

  • Prev by Date: Re: Image and String in single cell?
  • Next by Date: Re: Is Concatenation that complex?
  • Previous by thread: Is Concatenation that complex?
  • Next by thread: Re: Is Concatenation that complex?
  • Index(es):
    • Date
    • Thread