I always like input in my function to get numbers that range from 0.1 to 999.9 (the decimal part is always separated by '.', if there is no decimal then there is no '.' for example 9 or 7 .
How do I convert this String to float value regardless of localization (some countries use ',' to separate decimal part of number. I always get it with the '.')? Does this depend on local computer settings?
NumberFormat
- it is not threadsafe and it does not validate its input, for example"0x123" -> 0
,"3.14" -> 3.14
but"3,14" -> 314
(assuming US local). See my question/answer here: #77996284 – Stoneware