I have the following string:
const NumberAsString = "75,65";
And I need to parse it as float like this:
Amount: parseFloat(NumberAsString);
I've seen some post that suggested to replace the comma
with a dot
which works well when the comma
is used as thousand separator. But in this case the comma
is used as decimal separator If I replace it I get this number: 7.565,00
which is not my number 75.65
. Is there any way to parse this number to float without changing it's value?
PD: In my system I have a helper that takes the numbers with the dot as thousand separator and the comma as decimal separator. I cannot avoid this.