/ Published in: JavaScript
Public domain. This will capitalize the first letter of a string, and decapitalize the rest.
Expand |
Embed | Plain Text
function ucFirst(string) { return string.substring(0, 1).toUpperCase() + string.substring(1).toLowerCase(); }
You need to login to post a comment.
