• 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: Prepending to fixed length
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Prepending to fixed length


  • Subject: Re: Prepending to fixed length
  • From: Robert Walker <email@hidden>
  • Date: Tue, 18 Jul 2006 18:10:39 -0400

Trygve,

FYI: Here is a nice document you should scan through as well:

http://developer.apple.com/documentation/Cocoa/Conceptual/ DataFormatting/index.html

On Jul 18, 2006, at 6:02 PM, Trygve Inda wrote:


On 18 jul 2006, at 23.54, Trygve Inda wrote:

NSString *foo = [NSString stringWithFormat:@"]", aSignedInt];
This results in strings like " 8" instead of "08".

You forget to add a "0":

NSString *foo = [NSString stringWithFormat:@"d", aSignedInt];

j o a r



Yep,

aString = [NSString stringWithFormat:@"d", aSignedInt]; works. Many
thanks guys.

Steep learning curve, but Cocoa is growing on this old Carbon guy.

Trygve


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40mac.com


This email sent to email@hidden

-- Robert Walker email@hidden



_______________________________________________
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


References: 
 >Re: Prepending to fixed length (From: Trygve Inda <email@hidden>)

  • Prev by Date: Re: Address of pointer just changes
  • Next by Date: NSArrayController filterPredicate not truly observable
  • Previous by thread: Re: Prepending to fixed length
  • Next by thread: Re: Prepending to fixed length
  • Index(es):
    • Date
    • Thread