PureMVC Framework for haXe: API Documentation
Back | Index
class Std
The Std class provides standard methods for manipulating basic types.
static function bool(x : Dynamic) : Bool
Convert any value to a Bool. Only 0, null and false are false, other values are true.
static function chr(x : Int) : String
Convert a character code into the corresponding single-char String.
static function int(x : Float) : Int
Convert a Float to an Int, rounded down.
static function is(v : Dynamic, t : Dynamic) : Bool
Tells if a value v is of the type t.
static function ord(x : String) : Null<Int>
Return the character code of the first character of the String, or null if the String is empty.
static function parseFloat(x : String) : Float
Convert a String to a Float, parsing different possible reprensations.
static function parseInt(x : String) : Null<Int>
Convert a String to an Int, parsing different possible representations. Returns null if could not be parsed.
static function random(x : Int) : Int
Return a random integer between 0 included and x excluded.
static function resource(name : String) : String
Return the given resource stored using -res, or null if not defined.
static function string(s : Dynamic) : String
Convert any value to a String
Back | Index