length

Availability

Flash Player 4. This function, along with all of the string functions, was deprecated in Flash 5. Macromedia recommends using the methods of the String class and the String.length property to perform the same operations.

Usage

length(expression)
length(variable)

Parameters

expression A string.

variable The name of a variable.

Returns

The length of the specified string or variable name.

Description

String function; returns the length of the specified string or variable name.

Example

The following example returns the value of the string "Hello".

length("Hello");

The result is 5.

See also

" " (string delimiter), String class, String.length