for example.
If I have the decimal
123.4567
I want the string
123.4567
but if I have the decimal
123.4000000
I want the string
123.40
Note, this is not rounding, I just don’t want to end up with decimal strings with 4 zeroes after the point every time when I convert it to a string.
Try this
This will give a max of 4 digits after the decimal. Adjust the number of
#‘s to get the wanted number of max decimal digits.