Right() function as3?

hey there… I’m just wondering… is there a function like right() or left() (in c/vb)…
where I can read small parts of a text.

Something like this:


var myString:String = "";
 
myString = "Hello World!";
 
trace(left(myString, 5)); //outputs the 5 first chars "Hello";
 
trace(right(myString, 6)); //outputs the 6 last chars "World!";

well… the right starts from the right and reads to the left (as many chars as input. eg. 5 or 6 as in the example)

Cheers!