private function getZipName id String name String String capitalize on

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
private function getZipName(id:String, name:String):String
{
//capitalize only first letter
var word:String;
var firstLetter:String = name.substr(0, 1);
firstLetter = firstLetter.toUpperCase();
var otherLetters:String = name.substring(1);
otherLetters = otherLetters.toLowerCase();
word = firstLetter + otherLetters;
return id + " (" + word + ")";
}