Version: v0.7.0 - Beta.  We welcome contributors & feedback.

String.toNumber

toNumber($thousandSeparator = ',', $decimalMark = '.') -> number

Description

Parse the string and convert it to a Number type.

'1234.56'.toNumber()
//= 1234.56

'99ft'.toNumber()
//= 99

'1.300.000,01'.toNumber('.', ',')
//= 1300000.01

See Also