Sorry.. my mistake...
> -Oorspronkelijk bericht-
> Van: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Namens
> Steven Sacks | BLITZ
> Verzonden: woensdag 2 augustus 2006 0:16
> Aan: Flashcoders mailing list
> Onderwerp: RE: [Flashcoders] String Empowerment
> Don't use the toLowerCase()
> Because when I write my name like: "Bernard Visscher" I don't want the
> output to be "Bernard visscher" with the lowercase V.
That's what capitalize() does. For what you're wanting you should use
toTitleCase().
___
F
teven Sacks | BLITZ
> Verzonden: dinsdag 1 augustus 2006 19:20
> Aan: Flashcoders mailing list
> Onderwerp: RE: [Flashcoders] String Empowerment
>
> Right you are! Thanks!
>
> BLITZ | Steven Sacks - 310-551-0200 x209
>
> > -Original Message-
> > From:
Right you are! Thanks!
BLITZ | Steven Sacks - 310-551-0200 x209
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:flashcoders-
> [EMAIL PROTECTED] On Behalf Of Heerko van der Kooij
> Sent: Tuesday, August 01, 2006 9:12 AM
> To: Flashcoders mailing list
> Subject
Hi Steven,
Maybe i'm saying something stupid here, but would this be a prettier
way to do the capitalize?
String.prototype.capitalize = function() {
return this.charAt(0).toUpperCase() + this.substr(1).toLowerCase();
}
gr, heerko
On 28-jul-2006, at 0:39, Steven Sacks | BLITZ wrote:
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);
LITZ
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 th
> 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.
__
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()
>
> String.to
> 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
-Oorspronkelijk bericht-
> Van: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Namens
> Steven Sacks | BLITZ
> Verzonden: vrijdag 28 juli 2006 0:59
> Aan: Flashcoders mailing list
> Onderwerp: RE: [Flashcoders] String Empowerment
>
> Pseudocode examples of usa
essage -
From: "Steven Sacks | BLITZ" <[EMAIL PROTECTED]>
To: "Flashcoders mailing list"
Sent: Friday, July 28, 2006 6:59 AM
Subject: [SPAM] RE: [Flashcoders] String Empowerment
Pseudocode examples of usage:
"hello".ca
Pseudocode examples of usage:
"hello".capitalize() > "Hello"
"HELLO".capitalize() > "Hello"
"123ABC".capitalize() > "123abc"
"hello".center(4) > "hello"
"hello".center(20, "_") > "___hello"
"hello".chomp() > "hello"
"hello\n".chomp() > "hello"
"hello \n there".ch
13 matches
Mail list logo