Answers for "haxe split string"

0

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));
  }
}
Posted by: Guest on August-14-2020

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language