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

Re: Oddity


  • Subject: Re: Oddity
  • From: Angela Brett <email@hidden>
  • Date: Fri, 16 Nov 2001 23:23:09 +1300

Any quesses as to what happened. (And while we're at it, how do I get the first value, city, into the string without a leading space?)

I guess the answer is so obvious that you didn't think of it... it's okay to just delete the space in the @" " as in: cityStateZip=@""

Or, if you felt like doing more typing for no reason, cityStateZip=[NSString string] does the same thing. cityStateZip=[[NSString alloc] init] would also work, but then the string wouldn't be autoreleased.

Incidentally, you could probably simplify your code by using an NSMutableString, then you can just use appendString: instead of using stringByAppendingString. You should probably also look at NSString's stringWithFormat: method, it might be able to make it even easier.
--
Angela Brett email@hidden http://acronyms.co.nz/angela
A mathematician is a machine for turning coffee into theorems -- Paul Erdos


References: 
 >Oddity (From: email@hidden)

  • Prev by Date: Re: Oddity
  • Next by Date: Re: Standard OS X Compression format
  • Previous by thread: Re: Oddity
  • Next by thread: Re: Oddity
  • Index(es):
    • Date
    • Thread