haxe split string code example
Example: haxe split string
class Main {
static function main() {
// - USING THE STRING CLASS
var str = "H.e.l.l.o";
// ["H","e","l","l","o"]
trace(str.split("."));
// - USING REGEX
str = "XaaaYababZbbbW";
var r = ~/[ab]+/g;
// ["X","Y","Z","W"]
trace(r.split(str));
}
}