Parse number values from strings with bases other than 10 using the parseInt() function. : Number parse : Data Type Flash / Flex / ActionScript examples
Parse number values from strings with bases other than 10 using the parseInt() function.
package{ import flash.display.Sprite;
public class Main extends Sprite{ public function Main(){ var nOne:Number = parseInt("11", 10); // 11 var nTwo:Number = parseInt("11", 2); // 3 var nThree:Number = parseInt("gg", 17); // 288
} } }
Related Scripts with Example Source Code in same category :