|
Newsletters
|
|
|
|
|
WMLScript Reference
WMLScript Reference
WMLScript > Lang > parseInt()
parseInt() - The parseInt Function
Usage: parseInt(value)
Description: Returns an integer value defined by the string value. The legal integer syntax is specified by the WMLScript numeric string grammar for decimal integer literals with the following additional parsing rule:
- Parsing ends when the first character is encountered that is not a leading '+' or '-' or a decimal digit.
The result is the parsed string converted to an integer value.
Example:var i = Lang.parseInt("1234"); // i = 1234
var j = Lang.parseInt(" 100 m/s"); // j = 100
Bookmark this page
|
|