capitalize :: String

capitalize() -> string

 

Capitalizes the first letter of a string and downcases all the others.

 

Examples

 

'hello'.capitalize();

// -> 'Hello'

 

'HELLO WORLD!'.capitalize();

// -> 'Hello world!'


Prototype API 1.5.0 - prototypejs.org