Return to Snippet

Revision: 61861
at January 20, 2013 21:02 by kzelda


Initial Code
function strToFloat(s) {
            try {
                return parseFloat(s.replace(",00", "").replace(/\s+/g, "").replace(" ", "").replace(",", "."));
            }
            catch (e) {
                return 0;
            }
        }

Initial URL

                                

Initial Description
Convert str to float;

Initial Title
JavaScript StrToFloat

Initial Tags

                                

Initial Language
JavaScript