The split() method asks that you specify the delimiter it should use to determine the elements of the list : split « Array « Flash / Flex / ActionScript






The split() method asks that you specify the delimiter it should use to determine the elements of the list

 

package{
  import flash.display.Sprite;
  
  public class Main extends Sprite{
    public function Main(){

        var sEmployees:String = "A,P,C,H";
        var aEmployees:Array = sEmployees.split(",");
        trace(aEmployees); 
    }
  }
}

        








Related examples in the same category

1.Converting a String to an Array: Use the String.split(delimiter, maximum_number_of_elements_to_place_into_the_new_array) method.