1 (function () { 2 /** @exports stringPrototype as String.prototype*/ 3 var stringPrototype = String.prototype; 4 5 /** 6 * <p>Returns this string with the char at first position in uppercase.</p> 7 * <p>Example of use:</p><pre><code> 8 "the brown Fox jumped over the lazy Dog".capitalize(); // = "The brown Fox jumped over the lazy Dog" 9 </code></pre> 10 * @return capitalized string. 11 * @memberOf String.prototype 12 */ 13 stringPrototype.capitalize = function () { 14 return this.charAt(0).toUpperCase() + this.substring(1); 15 }; 16 }()); 17