Create a String object by simply invoking a property or method of the String class from a primitive string value : String « String « Flash / Flex / ActionScript
Create a String object by simply invoking a property or method of the String class from a primitive string value
package{
import flash.display.Sprite;
publicclass Main extends Sprite{
public function Main(){
var dToday:Date = new Date();
var sDate:String = new String(dToday.toString());
trace("ActionScript Bible".length); // Displays 18
}
}
}