decimal floating formatting question
decimal floating formatting question
- Subject: decimal floating formatting question
- From: Mark Dawson <email@hidden>
- Date: Wed, 22 Dec 2004 15:59:49 -0800
Is there a way to format a decimal number with no trailing zeros and
show only "X" number of digits? I would like 1.0 to show up as "1",
1.2 as '1.2";, 1.31457 as "1.3146".
I'm familiar with the "%.4f" type format, but while this limits the
output to 4 decimal points, it adds trailing zeros (i.e., "1.2000").
Is there a way to the best of both worlds via a formatting option?
Thanks!
mark
_______________________________________________
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