Pages

Monday, June 29, 2009

WTF: BigDecimal.stripTrailingZeros().toPlainString()

(new BigDecimal("1.00")).stripTrailingZeros().toPlainString(); // "1"
(new BigDecimal("0.00")).stripTrailingZeros().toPlainString(); // "0.00"

Disqus for Code Impossible