Posts Tagged trim

Simplest way to remove trailing zeros of decimal numbers

This is a simple method I found to remove or strip trailing zeros of a decimal number. The function accepts the decimal number and return the trimmed value back. It removes all the redundant zeros in the number after the decimal point and if no number other than zero is present after the decimal point the decimal point too is removed.

Continue reading “Simplest way to remove trailing zeros of decimal numbers” »


, , ,

13 Comments