Std

class StdAvailable in flash8, flash, neko, js, php, cpp, cs, javaThe Std class provides standard methods for manipulating basic types. static function int( x : Float ) : IntConvert a Float to an Int, chopped off. eg. Std.int(3.14) == 3; Std.int(-3.14) == -3; static function is( v : Dynamic, t : Dynamic ) : BoolTells if a value v is of the type t.
This is about the runtime value, not the compile-time type. ( Nicolas Cannasse's statement )
static function parseFloat( x : String ) : FloatConvert a String to a Float, parsing different possible representations. Depending on the target and platform, strings that cannot be parsed may return null or 0. static function parseInt( x : String ) : Null<Int>Convert a String to an Int, parsing different possible representations. Depending on the target and platform, strings that cannot be parsed may return null or 0. Some targets treat strings that start with 0 as octal. You can also parse hexadecimal numbers beginning with "0x". static function random( x : Int ) : IntReturn a random integer between 0 included and x excluded. For random Float see Math.random(). static function string( s : Dynamic ) : StringConvert any value to a String
version #15031, modified 2012-07-16 12:30:03 by api
0 comment