S > String (function)

String (function)

Syntax

String(expression);

Arguments

expression The number, Boolean, variable, or object to convert to a string.

Description

Function; returns a string representation of the specified argument as follows:

If x is Boolean, the return string is true or false.

If x is a number, the return string is a decimal representation of the number.

If x is a string, the return string is x.

If x is an object, the return value is a string representation of the object generated by calling the string property for the object, or by calling object.toString if no such property exists.

If x is a movie clip, the return value is the target path of the movie clip in slash (/) notation.

If x is undefined, the return value is an empty string.

Player

Flash 3 or later.

See also

Object.toString
Number.toString
String (object)
" " (string delimiter)