Flash Lite 2.x and 3.0 ActionScript Language Reference

length function

length(expression)length(variable)

Deprecated since Flash Player 5. This function, along with all the string functions, has been deprecated. Adobe recommends that you use the methods of the String class and the String.length property to perform the same operations.

Returns the length of the specified string or variable.

Parameters

expression:String - A string.

variable:Object - The name of a variable.

Returns

Number - The length of the specified string or variable.

Example

The following example returns the length of the string "Hello": length("Hello"); The result is 5.

See also

" string delimiter operator, String, length (String.length property)