Selaa lähdekoodia

- fixed String.split() for empty delimiter (php)

Franco Ponticelli 16 vuotta sitten
vanhempi
commit
40ab839bcd
1 muutettua tiedostoa jossa 2 lisäystä ja 0 poistoa
  1. 2 0
      std/php/Boot.hx

+ 2 - 0
std/php/Boot.hx

@@ -209,6 +209,8 @@ function _hx_exception_handler($e) {
 }
 
 function _hx_explode($delimiter, $s) {
+	if($delimiter == '')
+		return new _hx_array(str_split($s, 1));
 	return new _hx_array(explode($delimiter, $s));
 }