Name
String.toUpperCase( ) Method — generate an uppercase version of a string
Availability
Flash 5
Synopsis
string.toUpperCase( )
Returns
The uppercase (a.k.a. ALL CAPS) equivalent of
string
as a new string. Characters without
an uppercase equivalent are left unchanged.
Description
The toUpperCase( )
method creates a new,
uppercase version of string
; it can be
used for formatting or to facilitate case-insensitive character
comparisons. The toUpperCase( )
method converts
only characters in the range a-z (it does not convert characters with
diacritical marks such as accents and umlauts).
Usage
Note that toUpperCase( )
does not modify
string
; it returns a completely new
string.
Example
"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"
See Also
String.toLowerCase( )
;
Section 4.6.8.1 in Chapter 4
Get ActionScript: The Definitive Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.