accessing the name string

how can i use the transform.name string to make another string composed of the first few letters in the name

example:

transform.name=because

???

var a=becau

var a = transform.name.Substring(0, Mathf.Min(5, transform.name.length));

You can see the specification for Substring(int, int) here:http://msdn2.microsoft.com/en-us/library/aka44szs.aspx

perfect thats exactly what i needed

thanks alot

Very good to know, especially since this functionality is the string.substr functionality of plain JavaScript (rather than .Net/ Mono).