Greetings!
I have the following numbers...
10.45
0.3
0.00
... that I'd like to display like this...
10.45
.3
.00
What is the best way to do this besides using string functions? I'm already using BigDecimal's setScale() method to round the decimals, but now I'd like to get rid of leading zeros.
Any ideas?
---------------------
He who has knowledge spares his words, and a man of understanding is of a calm spirit. Even a fool is counted wise when he holds his peace; when he shuts his lips, he is considered perceptive. - King Solomon
I have the following numbers...
10.45
0.3
0.00
... that I'd like to display like this...
10.45
.3
.00
What is the best way to do this besides using string functions? I'm already using BigDecimal's setScale() method to round the decimals, but now I'd like to get rid of leading zeros.
Any ideas?
---------------------
He who has knowledge spares his words, and a man of understanding is of a calm spirit. Even a fool is counted wise when he holds his peace; when he shuts his lips, he is considered perceptive. - King Solomon