title: Capitalize first letter of a camelcase string in Javascript
body: <p>I'm trying to obtain a camel case string (but with the first letter capitalized).</p>
  
  <p>I'm using the following regular expression code in JavaScript:</p>
  
  <pre><code>String.prototype.toCamelCase = function() {
  return this.replace(/^([A-Z])|\s(\w)/g, function(match, p1, p2, offset) {
      if (p2) return p2.toUpperCase();
      return p1.toLowerCase();
  });
  </code></pre>
  
  <p>but the first letter is converted to a lower case.</p>