Hello all,
I feel sheepish to keep asking for help like this.
But, I can’t seem to figure this one out. I am making an app that outputs numbers. Sometimes those numbers are decimals.
I have a for loop that formats all the answers to a user specified amount of decimal places. The maximum allowed decimals is 5 and the minimum is 2.
Sometimes the answers come out like 45.00000 Is there any way to utilize string.format() or any other code to check if the last char in a string is a 0 or . and if it is remove it?