If you use another delimiter in the string, you need to specify it as the argument for the : Split : String Flash / Flex / ActionScript examples


Flash / Flex / ActionScript examples » String » Split »

 

If you use another delimiter in the string, you need to specify it as the argument for the


 
split() method appropriately.

package{
  import flash.display.Sprite;
  
  public class Main extends Sprite{
    public function Main(){
        var sValue:String = "a b c d e f";
        var aValues = 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