1

The string values keep changing (see example below). I want to get the initial (first) value. How can I accomplish this?

Example:

var loading:String;
trace(""+loading);
O/P : 1,2,3,4,5,6,7,8,9

I want the first value (i.e. "1").

4

1 回答 1

0

尝试这个。

loading.charAt(0);

或者

loading.substr(0, 1)
于 2013-06-21T14:27:19.300 回答