zumindest kannst du test.length weglassen. var test:String = "company"; test = test.substr(0, 1).toUpperCase()+test.substr(1).toLowerCase(); Am 26.01.2007 um 18:26 schrieb Peter Oliver Geller:
Hi is there a shorter way to change "company" into "Company"? var test = "company";trace(test.substring(0,1).toUpperCase() + test.substring (1,test.length));or like var test = "company"; var firstLetter = test.charAt(0).toUpperCase(); var otherLetters = test.substring(1).toLowerCase(); trace( firstLetter + otherLetters );
-- Planetactive - The Full Service Digital Agency part of Neo@Ogilvy http://www.planetactive.com thomas karg | head of flash & videovoice ++49-211-5404-248 | fax ++49-211-5404-181 | mailto: tkarg@xxxxxxxxxxxxxxxx
planetactive gmbh | plange muehle 1 | 40221 duesseldorf | germany