Skip to content

Instantly share code, notes, and snippets.

@miah
Created April 4, 2017 23:52
Show Gist options
  • Select an option

  • Save miah/ffb3f5e79951de4e3de0592991ce8347 to your computer and use it in GitHub Desktop.

Select an option

Save miah/ffb3f5e79951de4e3de0592991ce8347 to your computer and use it in GitHub Desktop.
var words:String = "foo bar";
var PH_oldArray:Array = words.split(" ");
var PH_newArray:Array = [];
var param1:String = "";
for each(var word:String in PH_oldArray)
{
PH_newArray.push(word.charAt(0).toUpperCase() + word.slice(1));
}
param1 = PH_newArray.join(" ");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment