String.toUpperCase( ) Method | Flash 5 |
generate an uppercase version of a string |
The uppercase (a.k.a. ALL CAPS) equivalent of string as a new string. Characters without an uppercase equivalent are left unchanged.
The toUpperCase( ) method creates a new, uppercase version of string; it can be used for formatting or for facilitating case-insensitive character comparisons.
Note that toUpperCase( ) does not modify string; it returns a completely new string.
"listen to me".toUpperCase(); // Yields the string "LISTEN TO ME" var msg1 = "Your Final Score: 234"; var msg2 = msg1.toUpperCase(); // Set msg2 to "YOUR FINAL SCORE: 234"
String.toLowerCase( ); "The toUpperCase( ) function," in Chapter 4