4 public function __construct(){}
5 static function is($v, $t) {
6 return _hx_instanceof($v, $t);
8 static function string($s) {
9 return _hx_string_rec($s, "");
11 static function int($x) {
14 static function parseInt($x) {
17 preg_match("/^-?\\d+/", $x, $matches);
18 return ((count($matches) === 0) ? null : intval($matches[0]));
20 return ((strtolower(_hx_substr($x, 0, 2)) === "0x") ? (int) hexdec(substr($x, 2)) : intval($x));
23 static function parseFloat($x) {
28 if($v === 0.0 && !is_numeric($x)) {
34 static function random($x) {
35 return mt_rand(0, $x - 1);
37 function __toString() { return 'Std'; }