Parses a string representation of a numeric value as an integer, according to the specified number format.
Copyright © 2016 Mobilengine Corp. All rights reserved. version: 7.0.4.19927
Parses a string representation of a numeric value as an integer, according to the specified number format.
Returns
The int value that corresponds to the string parameter. The method returns undefined
if the string parameter cannot be parsed as an integer using the number-format
parameter.
Sample
var nuf = {decimalSeparator: ".", groupSize:3, groupSeparator: "+"}; var c =int.ParseNuf(nuf, "876+543")
; trace "Here's your number: ", c; var d =int.ParseNuf(nuf, "765 432")
; trace "Non format conformant strings return ", d; trace "Leading zeroes are ignored",int.ParseNuf(nuf, "00000654+321")
; var e =int.ParseNuf(nuf, "2.1")
; trace "Strings with a decimal separator return", e;
"Here's your number: ", 876543 "Non format conformant strings return ", <<undefined>> "Floats return ", <<undefined>>
Figure 335. The trace message output of the script above