I have strings in currency format which i have to convert to float without using any js library.
2 079,15 EUR as an example should return 2079.15
Is there a simple way to do it ?
the solution proposed in How to convert a currency string to a double with jQuery or Javascript? is not working in this case:
As it will return
207915in case of2 079,15 EURinstead of2079.15And will return
2079in case of2 079 EURA working solution should return even:
207915in the 1st case and207900in the 2nd case or2079.15in the 1st case and2079in the 2nd case.The solution : https://stackoverflow.com/a/559178/1086682 works in case of local "US" or "en-GB" but does not work for "FR".