w3schools    w3Schools
Search :
   
HOME HTML CSS XML JAVASCRIPT ASP PHP SQL MORE...   References Examples Forum About
ADVERTISEMENTS

XML Certification
Download XML editor
Custom Programming
 
Table of contents
WMLScript Tutorial
WMLScript HOME
WMLScript Intro
WMLScript How to

WML Libraries
WML Dialogs
WML Float
WML Lang
WML String
WML URL
WML Browser

Selected Reading
Web Statistics
Web Glossary
Web Hosting
Web Quality

Browse Tutorials
 

WMLScript parseInt() Function


WMLScript Lang Library Complete WMLScript Lang Library

The parseInt() function returns an integer defined by the string value.

The parsing ends on the first character that is not a leading "-", "+", or a decimal digit.

Syntax

n = Lang.parseInt(string)

Part Description
n The integer returned from the function
string A string

Example

var a = Lang.parseInt("2345");
var b = Lang.parseInt("200 m/s");

Result

a = 2345
b = 200


WMLScript Lang Library Complete WMLScript Lang Library