Every line of 'unity string to float' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your JavaScript code is secure.
65 function float(str) { 66 if (!str) { 67 return 0; 68 } 69 return parseFloat(str, 10); 70 }
Secure your code as it's written. Use Snyk Code to scan source code in minutes – no build needed – and fix issues immediately. Enable Snyk Code
82 function parseFloatList(string) { 83 return $.map(string.split(','), function (x) { return parseFloat(x.trim()); }); 84 }
75 function float(val) { 76 /* jshint eqnull: true */ 77 if (val == null) { 78 return null; 79 } 80 var r = parseFloat(val); 81 return isNaN(r) ? val : r; 82 }
23 parseFloat() { 24 return new Value(this.response, 'Text of ' + this.name, parseFloat(this.toString())); 25 }
41 function stringToFloat(value) { 42 return parseFloat(value.replace(/[^0-9,]/g, '').replace(',', '.')); 43 }
25 function parseFloat(v: any) { 26 if (v == undefined) { 27 return 0 / 0; 28 } 29 30 const num = tonumber(v); 31 if (num === null) { 32 return 0 / 0; 33 } 34 35 return num; 36 }