Use split(String, index) to split String to array of strings : Split : String Flash / Flex / ActionScript examples


Flash / Flex / ActionScript examples » String » Split »

 

Use split(String, index) to split String to array of strings


 

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

        var sentence:String = "The quick brown fox jumped over the lazy dog";
        var words:Array = sentence.split(""4)// limit to 4 elements.
        trace(words);
    }
  }
}

        



Leave a Comment / Note


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


Flash / Flex / ActionScript examples

 Navioo String
» Split