If you REALLY wanted to be fancy, you could have it accept an array of
words *not* to capitalize (unless they are the first word). For example:
var lowerCaseWords:Array = ["a", "an", "and", "of", "the"];
trace("a tale of two cities".toTitleCase(lowerCaseWords));
trace("THE PRINCE AND THE PAUPER".toTitleCase(lowerCaseWords));
// Output:
// A Tale of Two Cities
// The Prince and the Pauper
--
T. Michael Keesey
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Steven
Sacks | BLITZ
Sent: Friday, July 28, 2006 12:01 PM
To: Flashcoders mailing list
Subject: RE: [SPAM] RE: [Flashcoders] String Empowerment
> umm... Title Case as MS Word calls it...
Title Case in Word is different than capitalize. Title Case capitalizes
every word in a string. Capitalize only capitalizes the first character
of the string. However, toTitleCase() would be a handy method. I'll
code it.
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com