toLowerCase (String.toLowerCase method)

public toLowerCase() : String

Returns a copy of this string, with all uppercase characters converted to lowercase. The original string is unmodified.

This method converts all characters (not simply A-Z) for which Unicode lowercase equivalents exist. These case mappings are defined in the UnicodeData.txt file and the SpecialCasings.txt file, as defined in the Unicode Character Database specification.

Availability: ActionScript 1.0; Flash Player 5

Returns

String - A string.

Example

The following example creates a string with all uppercase characters and then creates a copy of that string using toLowerCase() to convert all uppercase characters to lowercase characters:

var upperCase:String = "LOREM IPSUM DOLOR";
var lowerCase:String = upperCase.toLowerCase();
trace("upperCase: " + upperCase); // output: upperCase: LOREM IPSUM DOLOR
trace("lowerCase: " + lowerCase); // output: lowerCase: lorem ipsum dolor

For another example, see the Flash Samples page at www.adobe.com/go/learn_fl_samples. Download and decompress the Samples zip file and go to the ActionScript2.0\Strings folder to access the Strings.fla file.

See also

toUpperCase (String.toUpperCase method)


Flash CS3