Flash / Flex / ActionScript/String/length

Материал из Web эксперт
Перейти к: навигация, поиск

To determine the number of characters a string object contains you can check its length property.

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

         var bigWord:String = "CONIOSIS";
         trace("Number of letters: ", bigWord.length); // Displays: 45
    }
  }
}