Use of a for loop to loop through the characters of a string, one at a time : CharAt : String Flash / Flex / ActionScript examples


Flash / Flex / ActionScript examples » String » CharAt »

 

Use of a for loop to loop through the characters of a string, one at a time


 

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

        var sTitle:String = new String("ActionScript");
        for (var i:Number = 0; i < sTitle.length; i++){
           trace(sTitle.charAt(i));
        }
    }
  }
}
A
c
t
i
o
n
S
c
r
i
p
t

        



Leave a Comment / Note


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


Flash / Flex / ActionScript examples

 Navioo String
» CharAt