0

I have got a number 12.515, and I want to display only 12.5, so from my understanding what I do is simply add a substring(0, 4) to it, however if the number falls below 10, for example 9.515, it displays 9.51, and I want it to display 9.5 only. Is there a simple solution to it?

Thank you.

emilien
  • 23
  • 4

0 Answers0