Converting a String into an Array : Split : String Flash / Flex / ActionScript examples


Flash / Flex / ActionScript examples » String » Split »

 

Converting a String into an Array


 

package{
  import flash.display.Sprite;
  
  public class Main extends Sprite{
    public function Main(){
        var sValue:String = "a,b,c,d,e,f";
        var aValues:Array = sValue.split(",");
        for (var i = 0; i < aValues.length; i++){
           trace(aValues[i]);
        }
    }
  }
}
a
b
c
d
e
f

        



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


Flash / Flex / ActionScript examples

 Navioo String
» Split