haxe split string

Solutions on MaxInterview for haxe split string by the best coders in the world

showing results for - "haxe split string"
Juan
04 Aug 2018
1class Main {
2  static function main() {
3  	// - USING THE STRING CLASS
4    var str = "H.e.l.l.o";
5    // ["H","e","l","l","o"]
6    trace(str.split("."));
7
8    // - USING REGEX
9    str = "XaaaYababZbbbW";
10    var r = ~/[ab]+/g;
11    // ["X","Y","Z","W"]
12    trace(r.split(str));
13  }
14}
15
16
17