parse

returns a number from the formatted string

number parse(string value,object config);

Parameters

valuestringthe string which needs formatting
configobjectan object of formatting configuration options

Returns

numbera number from the formatted string
Details

The config object can contain the following attributes:

  • decimalSize - the number of decimal digits in the float number. By default, 2;
  • groupSize - the number of digits in a group. By default, 3;
  • decimalDelimiter - a char which separates the decimal part in the float number. By default, ".";
  • groupDelimiter - a char which separates groups of digits. By default, ",".
var num1 = webix.Number.parse("10'009.00", {
    decimalSize: 2, groupSize: 3, 
    decimalDelimiter: ".", groupDelimiter: "'"
});
// -> 10009
See also
Back to top