package{
import flash.display.Sprite;
publicclass Main extends Sprite{
public function Main(){
var example:String = "a string";
var characters:Array = example.split( "" );
characters.sort( );
for ( var i:int = 0; i < characters.length; i++) {
trace( characters[i] );
}
}
}
}