Re: Formatting an NSString
Re: Formatting an NSString
- Subject: Re: Formatting an NSString
- From: "Erik M. Buck" <email@hidden>
- Date: Sat, 1 Sep 2001 11:48:33 -0500
Look at the formatting options of printf and sprintf. There are field width
specifies.
To print a floating point number with 2 decimal places right aligned always
using 20 characters:
printf("% 20.2f", someNumber);
NSString has printf style format options.
----- Original Message -----