Skip to content

Capitalize First Letter in Word – Actionscript 2

You have a string and you want to capitalize the first character but have the rest of the word in lowercase.

DO THIS!

myStringVar = myStringVar.substring(0, 1).toUpperCase()+myStringVar.substring(1);

See also  How to Confirm before Leaving Page in Javascript
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x