Posted By

remysharp on 07/24/07


Tagged

ucfirst uppercase uc


Versions (?)

ucfirst


 / Published in: JavaScript
 

Extends the string object to include ucFirst ala Perl ucfirst()

  1. String.prototype.ucFirst = function () {
  2. return this.substr(0,1).toUpperCase() + this.substr(1,this.length);
  3. };

Report this snippet  

You need to login to post a comment.