string.capitalize
string.capitalize(s)
Parameters
- s
{String}
:the string to capitalize
Returns
{String}
:
the supplied string with the first character uppercased if it is a letter
var string = require("can-util/js/string/string");
console.log(string.capitalize("foo")); // -> "Foo"
console.log(string.capitalize("123")); // -> "123"