• 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: stringWithFormat: problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: stringWithFormat: problem


  • Subject: Re: stringWithFormat: problem
  • From: Markus Hitter <email@hidden>
  • Date: Sat, 4 Feb 2006 11:15:53 +0100


Am 04.02.2006 um 10:37 schrieb Thierry Passeron:

I have 2 objects, one is a formated string like @"This is %@ formated
string of %@".
The other is an array of string { "a", "mine" }.

This is an array of C strings, not NSStrings. To store strings in an NSArray, you have to use NSStrings. To format C strings, you have to use the %s formatter, not %@.


How is it possible to do that when you don't know what will be the
number of string in the array ?

Before you compose the resulting string, you have to check wether the ingredients exist. -[NSArray count] should help.



Markus

- - - - - - - - - - - - - - - - - - -
Dipl. Ing. Markus Hitter
http://www.jump-ing.de/




_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: stringWithFormat: problem
      • From: Thierry Passeron <email@hidden>
References: 
 >stringWithFormat: problem (From: Thierry Passeron <email@hidden>)

  • Prev by Date: Re: problem with [NSData bytes] on Intel
  • Next by Date: Re: replacing control characters in a NSMutableString
  • Previous by thread: stringWithFormat: problem
  • Next by thread: Re: stringWithFormat: problem
  • Index(es):
    • Date
    • Thread