String
1139
The following example shows what happens if a negative
start
parameter is used:
var my_str:String = "Hello world";
var mySubstring:String = my_str.substring(-5,5);
trace(mySubstring); // output: Hello
An example is also in the Strings.fla file in the ActionScript samples folder. The following list
gives typical paths to this folder:
■
Windows:
boot drive
\Program Files\Macromedia\Flash 8\Samples and
Tutorials\Samples\ActionScript
■
Macintosh:
Macintosh HD
/Applications/Macromedia Flash 8/Samples and Tutorials/
Samples/ActionScript
toLowerCase (String.toLowerCase method)
public toLowerCase() : String
Returns a copy of the
String
object, with all uppercase characters converted to lowercase.
The original value is unchanged.
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
An example is also in the Strings.fla file in the ActionScript samples folder. The following list
gives typical paths to this folder:
■
Windows:
boot drive
\Program Files\Macromedia\Flash 8\Samples and
Tutorials\Samples\ActionScript
■
Macintosh:
Macintosh HD
/Applications/Macromedia Flash 8/Samples and Tutorials/
Samples/ActionScript
See also
toUpperCase (String.toUpperCase method)
Summary of Contents for FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE
Page 1: ...ActionScript 2 0 Language Reference ...
Page 1352: ...1352 ActionScript classes ...