Just a quick note on capitalize()
String.toUpperCase() and String.toLowerCase() are part of ActionScript
1
since Flash 5
Capitalize is different than toUpperCase and toLowerCase. Those convert
the entire string, capitalize only uppercases the first character and
then lowercases the rest of
Those convert the entire string, capitalize only uppercases the first
character and then lowercases the rest of the characters.
umm... Title Case as MS Word calls it...
~Arul Prasad
On 7/28/06, Steven Sacks | BLITZ [EMAIL PROTECTED] wrote:
Just a quick note on capitalize()
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.
] 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
Here's toTitleCase:
String.prototype.toTitleCase = function() {
var a = this.length;
if (a == 0) return ;
var c;
var w;
var s = ;
while (--a -(-1)) {
c = this.charCodeAt(a);
w = this.charAt(a - 1);
w =
Dear Steven Sacks,
I greatly appreciate the efforts. Long time back we started ActionScript
Standard Library project in Sourceforge
(http://sourceforge.net/projects/fasl) unfortunately it was discontinued :(
On those days I wrote Code.Flash MX: String.changeCase(Title || Sentence ||
6 matches
Mail list logo