String.toUpperCase( ) Method

ActionScript for Flash MX: The Definitive Guide, 2nd Edition
By Colin Moock
Chapter 18.  ActionScript Language Reference
String.toUpperCase( ) Method Flash 5

generate an uppercase version of a string
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 for facilitating case-insensitive character comparisons.

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( ); "The toUpperCase( ) function," in Chapter 4



    ActionScript for Flash MX. The Definitive Guide
    ActionScript for Flash MX: The Definitive Guide, Second Edition
    ISBN: 059600396X
    EAN: 2147483647
    Year: 2002
    Pages: 780
    Authors: Colin Moock

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net