Wijmo UI for the Web
parseNumber Method
wijmo.input Namespace > IFormatValidateLib Interface : parseNumber Method
The string value to parse as a number.
The culture to use in parsing the number.

Use this method to parse the specified value and return it as a string using the specified format (or type) and options. To use this method, instead of wijmo.input.IFormatValidateLib.parseNumber, use $.wijinputcore.parseNumber. See example below for the correct usage.

Syntax
var instance; // Type: wijmo.input.IFormatValidateLib;
var returnValue; // Type: number

// Parameters
var value; // Type:  string
var culture; // Type:  string

returnValue = instance.parseNumber(value, culture);
function parseNumber( 
   value : string,
   culture : string
) : number;

Parameters

value
The string value to parse as a number.
culture
The culture to use in parsing the number.

Return Value

Returns the parsed number object, or null if the value cannot be parsed with the specified parameters.
Example
$.wijinputcore.parseNumber("12,345.00");     // returns: 12345
$.wijinputcore.parseNumber("12.345,00","de-DE");  // returns: 12345
$.wijinputcore.parseNumber("45.00 %");   // returns: 0.45
$.wijinputcore.parseNumber("$12345.67");  // returns: 12345.67
See Also

Reference

IFormatValidateLib Interface

Concepts

Parsing Function Library